PDA

View Full Version : ARB extensions



molmsted
10-03-2001, 08:22 AM
I am trying to compile using a function and variable that belong to the ARB extension set. However, whenever I try to compile I get "error C2065: 'glClientActiveTextureARB' : undeclared identifier". I am guessing I simply don't have a needed library of some sort but can't find any info on it. Does anyone know how and where I can get this or what to call.

Thanks,

Morris

Korval
10-03-2001, 10:14 AM
If you're using Windows, you will have to get the address of the function by calling wglGetProcAddress.

molmsted
10-03-2001, 10:16 AM
I don't understand. Don't I need to include some sort of ARB lib?


Originally posted by Korval:
If you're using Windows, you will have to get the address of the function by calling wglGetProcAddress.

FXO
10-03-2001, 01:36 PM
make sure you include all the OpenGL headers and the extension header, get from NVIDIA or ATI ("glext.h" or "glATI.h")

Then do this to get the function pointer:

PFNGLACTIVETEXTUREARBPROC glActiveTexture=NULL;

glActiveTexture = (PFNGLACTIVETEXTUREARBPROC) wglGetProcAddress("glActiveTextureARB");
if (glActiveTexture == NULL) printf("Multitexturing not supported!\n");

Hope this helps

[This message has been edited by FXO (edited 10-03-2001).]