GLee was one of those libraries that I'd thought I'd never need need, mostly because of not knowing what it really did. I've been working on a little SDL engine for fun in my spare time and had some troubles with the BSP tutorials from GT. Mainly the OpenGL process loading, wglGetProcAddress. For some odd reason, I just couldn't get it to work correctly. Anyways, I remembered Glee and gave it a try. It took me a few minutes to get it to link properly, due to having to include it before any other OpenGL libraries, but all that had to be done was include the .C file, include the .H file and it linked perfectly. After that, I took out all of the function loading code which looked like this:
if( !glActiveTextureARB )
{
// Initialize the multitexturing function pointers
glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC)wglGetProcAddress("glActiveTextureARB");
if( !glActiveTextureARB )
throw("glActiveTextureARB extension was not loaded.");
}
if( !glClientActiveTextureARB )
{
glClientActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC)wglGetProcAddress("glClientActiveTextureARB");
if( !glClientActiveTextureARB )
throw("glClientActiveTextureARB extension was not loaded.");
}
And took out the other variables for it:
typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum target);
typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
// These are the functions that we use for doing multitexturing
extern PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;
extern PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB;
And it's all ready! I simply compiled and it worked perfectly with no changes! So two thumbs up to Benjamin Bunny, and I encourage to give this great library a try if you are having trouble getting those extensions o work. [smile]