View Full Version : updating openGL headers under VC6

04-24-2003, 01:36 PM
I am trying to port an openGL app from linux to W98 using VC6. I have two questions:

First, I have the project set up correctly as near as I can tell, but the compiler is having trouble with some of the openGL multi-texturing commands. I'm assuming this is because the W98 openGL header files are obsolete. The question then is where would I get a current set of header files for opengl under w98?

The second question is how do you tell which opengl library is being used. I know that w98 came with an old version of the opengl libraries, but I have a newer video card with it's own library. I'm guessing that the the registry took care of which library to use, but I want to be sure that the new libraries are being used. How do I do this?


04-24-2003, 01:54 PM
Do a search on these forums and you'll find it's been asked & answered numerous times.

The short answer is, use glext.h and wglGetProcAddress for any functions added after version 1.1.

04-25-2003, 12:57 PM
...and you do need to update your GL files (or include <GL/glext.h> in your source, but I don't think that's a very nice solution).

You should do allright with the GL include files found here (http://hem.passagen.se/opengl/getstarted) (click on "GL Includes") - provided that you use wglGetProcAddress as Deiussum said.

Hint: Mutlitexturing is an extension to OpenGL - find out how to use OpenGL extensions.

Hint #2: Under Windows, all OpenGL versions > 1.1 are considered extensions, so if you program uses OpenGL 1.2 functions, for instance, you need to treat those as extensions too (i.e. use wglGetProcAddress to get the function pointers).

Hint #3: You can't use wglGetProcAddress until you have a valid GL rendering context (common pitfall).

[This message has been edited by marcus256 (edited 04-25-2003).]