I recently wanted to use some of the newer functionality found in OpenGL 3.1 and 3.2. However since I was using glew and it only supports GL versions up to 3.0, I had to manually add and initialize unsupported functions myself. This can be quite a pain, so I decided to write some code to automate this process (and replace glew).
It works in two steps
In the first step all the gl and wgl functions found in “glext.h” and “wglext.h” are parsed and stored in two files called “glfunc_test.h” and “glfunc_test.cpp”
In the second step a small win32 project is compiled which includes both these files. The resulting program creates a OpenGL context and requests function pointers to every function in “glext.h” and “wglext.h”. It spits out two files “opengl.h” and “opengl.cpp”. “opengl.h” contains function pointer declarations for all the gl/wgl functions supported by your video driver and “opengl.cpp” contains the definitions and a function to initialize the function pointers.
After generating “opengl.cpp” and “opengl.h” they can be included in your own opengl projects to have easy access to the GL/WGL extensions supported by your video card.
I don’t know how useful this is going to be to anyone, or if something like this already exists. It was useful to me so thats why I’m posting it here. If you have any questions you can put them in this thread.
The files can be found here:
http://rapidshare.com/files/298161299/gl_func.rar
or