PDA

View Full Version : extension loading .lib



paulc
05-29-2003, 02:25 PM
I am currently attempting to create an extension system. I'm trying to set it up as a static linked library that includes the glext.h and wglext.h headers. I've defined both GL_GLEXT_PROTOTYPES and WGL_WGLEXT_PROTOTYPES before including the headers so all the function prototypes are defined in the headers just waiting to be initialised with calls to wglGetProcAddress(). Currently I get unresolved external symbols as I've yet to persuade the main app to acknowledge the existence of the extension lib - or at least the fact that it (should) contain the function prototypes. I suspect I need to define the prototypes in the .cpp they are to be used in, but haven't been able to find the right syntax yet.

Apologies if this is just plain wrong and won't ever work, but its late and I can't see beyond the idea at the moment. I would really like to be able to handle all the extension loading external to the main app to reduce any platform specific code to a bare minimum.

nrg
05-30-2003, 08:53 PM
Originally posted by paulc:
I am currently attempting to create an extension system. I'm trying to set it up as a static linked library that includes the glext.h and wglext.h headers. I've defined both GL_GLEXT_PROTOTYPES and WGL_WGLEXT_PROTOTYPES before including the headers so all the function prototypes are defined in the headers just waiting to be initialised with calls to wglGetProcAddress(). Currently I get unresolved external symbols as I've yet to persuade the main app to acknowledge the existence of the extension lib - or at least the fact that it (should) contain the function prototypes. I suspect I need to define the prototypes in the .cpp they are to be used in, but haven't been able to find the right syntax yet.

Apologies if this is just plain wrong and won't ever work, but its late and I can't see beyond the idea at the moment. I would really like to be able to handle all the extension loading external to the main app to reduce any platform specific code to a bare minimum.

Why don't you just use the existing ones? Like glew (http://glew.sf.net) or extgl (http://www.levp.de/3d/extensionlib.html).

Those are crossplatform too.

stefan
05-31-2003, 06:32 AM
I really like glew, but I never got it working with nvparse. There were always unresolved references (I tried windows & linux). Has anyone succeeded with glew or some other open, cross platform library?

paulc
06-02-2003, 12:41 PM
Yeah, I'd started off looking for the existing libraries. Think I either was very lame with my googling or managed to click on every link except the right one http://www.opengl.org/discussion_boards/ubb/frown.gif . Ended up using extgl, didn't take too much too get it working. Haven't tried anything with any vert progs or pixel shaders yet though.