What lib is glActiveTextureARB in?
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.
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.
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?".
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
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 :)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement