glext.h

Having a problems with certain constants
in glext.h… I have the following

PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;

followed by a few others for multitexturing.
I’m getting compile errors like “missing ;
before glActiveTextureARB” as if PFNGLACTIVETEXTUREARBPROC is undefined…
I used #include “glext.h” with the file in the root of my project dir, but even if i
dont #include it i get the same errors…

anyone have any ideas?

thanks

UP! Same problem!

Maybe your implementations of OpenGL don’t handle this extension.

Originally posted by snakes!:
[b]Having a problems with certain constants
in glext.h… I have the following

PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;

followed by a few others for multitexturing.
I’m getting compile errors like “missing ;
before glActiveTextureARB” as if PFNGLACTIVETEXTUREARBPROC is undefined…
I used #include “glext.h” with the file in the root of my project dir, but even if i
dont #include it i get the same errors…

anyone have any ideas?

thanks
[/b]

I guess your including files in the wrong order or something like that. It would help if you can post the exact error message along with a code snippet (please use the code tag) and some information about your enviorment (compiler and operating system).

BTW: Since this is a compile time error it has nothing to do with the OpenGL implementation you use.

I think it’s because you have to declare PFNGLACTIVETEXTUREARBPROC *glActiveTextureARB
I mean, create a pointer, not a variable. If this doesn’t solve it try posting some code.

Honk is probably on the right track. Either that or, perhaps you have multiple source files and are forgetting to #include “glext.h” in one of them before you use PFNGLACTIVETEXTUREARBPROC.

As Honk said, it’s not an implmentation problem because you said you are getting compiler errors. If it was in implementation problem you would have runtime errors. (Page faults, etc.)

It’s not what moucard said either. Not only is PFNGLACTIVETEXTUREARBPROC already a typedef to a function pointer, but your error specifically states that it can’t find PFNGLACTIVETEXTUREARBPROC, so it obviously wouldn’t be able to find PFNGLACTIVETEXTUREARBPROC* any easier.

In any case, for whatever reason, the problem is that PFNGLACTIVETEXTUREARBPROC isn’t getting declared before you try to use it. You have to remember that .cpp files are compiled one at a time into object files, and they are compiled top-down, so you have to have things declared or defined before you can use them.