I have been working under linux using eclipse, gcc, opengl and cg. The program uses glActiveTexture with a GL_TEXTURE* as a parameter and runs correctly.
I’m trying to make the same program work under windows, still using eclipse, gcc, opengl and cg. After the first compile it couldn’t find any of GL_TEXTURE* or glActiveTexture, even though all the other opengl functions worked fine.
I included glext.h ( even though i didn’t need it under linux ) and it was able to find all GL_TEXTURE* but not glActiveTexture.
Is there something special about glActiveTexture under Windows ? Why do I have to include glext.h under windows and not linux ?
Those libraries are made by the the driver developers and Microsoft, so they can decide how to expose the different drivers. glActiveTexture was an extension at some point and I guess at some point some developer decided to move it to a different file.
I set out looking for where glActiveTexture might have been moved. To my suprise I found it in gl.h, along with all the GL_TEXTURE*s (where it should be :-)). This defies my logic, as I would think that including gl.h should do the job (my problem is not a link error).
This was more ( but at the same time less ) complicated than I thought…I was looking for something like libGLext.a, but I couldn’t find it.
I found out that GLee did the exact job I wanted to do so I just downloaded it from the opengl.org and included it insted of including gl.h and glext.h. I don’t need to define GL_GLEXT_PROTOTYPES anymore either.
So everything is hunky. Don’t quite understand it all ( and if anyone would like to explain that would be cool ) but I think thankyou GLee is in order.
Thanks for the reply strattonbrazil, it put me on the right track.