Sign in to follow this  
faculaganymede

What lib is glActiveTextureARB in?

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?".

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this