|
From: Daniel K. O. <dan...@ya...> - 2004-04-17 01:47:45
|
Mark Dillavou wrote:
>I'm having a tough time getting any glExtensions to work such as
>glActiveTextureARB. I know that in windows you have to do this:
>
>PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;
>glActiveTextureARB = SDL_GL_GetProcAddress("glActiveTextureARB");
>
>or you can use wglGetProcAddress
>
>but neither work for me. Dev-cpp tells me that glAtiveTextureARB is
>already defined, and if I remove that line, then it compiles ok, but
>won't link.
>
Do you know what this code do?
It gets a pointer to the function "glActiveTextureARB", and stores it in
your "glActiveTextureARB" pointer. If there's already a function defined
with this name, you just have to rename your pointer variable. Try:
PFNGLACTIVETEXTUREARBPROC MYglActiveTextureARB;
MYglActiveTextureARB = SDL_GL_GetProcAddress("glActiveTextureARB");
And call the MYglActiveTextureARB.
Daniel K. O.
|