Results 1 to 2 of 2

Thread: Making open GL wrapper library

  1. #1

    Making open GL wrapper library

    Hi ,
    I have just started making a C++ wrapper for open GL. What I have done is created a class called Triangle, which contains and array of 3 Vertices as private data, and a public render() function. Hence from another program you can create a Triangle and just call render() to draw.
    I have compiled this on Linux into a static library without problems. I now try and write a test program (using Qt, but this shouldn't be relevent) to test it, and I link this to my library. When I run it causes a segmentation fault and exits. Why is this? Is there something special I need to do make a libary and program work together like this. Obviosly there are other libraries which make this work, and it may be a general linking problem rather than and openGL problem, but any ideas?

    Thanks in advance,

  2. #2
    Senior Member Regular Contributor
    Join Date
    Sep 2000
    Vancouver BC Canada

    Re: Making open GL wrapper library

    Impossible to diagnose without code. Probably has nothing to do with the fact you're creating a library (but it might). With static libraries, link problems show up at link time, not run time, so I doubt it has anything to do with that.

    Here's a thought: have you tried running your program under a debugger? Like, say, gdb? Can you try and pinpoint where the crash happens and post that code?

    We're going to need a lot more info before anyone can even begin to help you out here.

Similar Threads

  1. Read the Superbible without the wrapper library
    By warook in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 01-27-2017, 07:39 AM
  2. OpenCL 2.0 wrapper library
    By acterhd in forum OpenCL
    Replies: 0
    Last Post: 10-22-2015, 06:36 AM
  3. Open GL MFC Wrapper
    By JRGlide in forum OpenGL: Windows
    Replies: 0
    Last Post: 07-17-2008, 02:38 PM
  4. Making the GLUI Library on Mac
    By in forum OpenGL: macOS
    Replies: 2
    Last Post: 09-01-2000, 09:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean