What lib is glActiveTextureARB in?

Started by
7 comments, last by faculaganymede 19 years, 2 months ago
I tried building my program that does multitexturing in VC 6.0, Windows 2000 and got the following linking error: "error LNK2001: unresolved external symbol _glActiveTextureARB" The program compiled ok. What library is glActiveTextureARB in? Thanks.
Advertisement
That's an extension, it isn't in a library as such. You have to obtain a function pointer to the address of that function and use it via that. Libraries such as GLee take a lot of the hassle out of using exstensions.
the rug - funpowered.com
You need to #include glext.h, then you need to obtain a function pointer to the address of the function. To see how to do that, check out this link, and scroll down to "23.070 How can I call extension routines on Microsoft Windows?".
Or use something like benjamin bunny's GLee.
ATI also has some headers that will initialize the extensions. I'm sure NVIDIA has something similar too.
The Rug, Doggan,

Thank you for your replies. There seems to be some serious conflicts between OpenGL and Performer APIs. I know for fact that my computer supports multitexturing. An OpenGL multitexturing program runs fine, but a Performer multitexturing program complaints that my hardware doesn't support it :(

When I add this in my code:
PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = NULL;

I get the following error:
error C2373: 'glMultiTexCoord2fARB' : redefinition; different type modifiers
c:\silicon graphics\opengl performer\include\performer\win32stubs.h(79) : see declaration of 'glMultiTexCoord2fARB'

-------------------------------------
When I add this in my code:
glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC)wglGetProcAddress("glActiveTextureARB");

I get the following error:
error C2659: '=' : overloaded function as left operand

It's infinitely easier to use the Glee library of the ATI headers referenced in the above posts than to set up the extensions by hand. If you have these libraries, you just have to call something like "SetupARBExtensions()" or something similar to get function pointers initialized for all of the extension functions.
Just to be complete, GLEW will also do the job. Last I heard it was meant to be better than GLee, but I've always done it the hard way :)
Thanks everyone for your inputs, good ideas and suggestions. I think this is the coolest forum on www.

I am running out of time to work on multitexturing stuff right now, but I'll return to it when I am done with other parts of my program.

This topic is closed to new replies.

Advertisement