View Full Version : Difference between the two headers.

10-28-2010, 08:47 PM
I have an engine right now that uses the #include <gl\gl.h> and while searching about opengl 3.3 because I only want to support those new graphics card only ( OpenGL 3.3 and above ), I found this http://www.opengl.org/registry/api/gl3.h. (http://www.opengl.org/registry/api/gl3.h) Should I use that one?

Thank you

10-29-2010, 04:19 AM
The key difference between the two is that gl3.h contains only non-deprecated API functions and enumerants. I don't know its current status but earlier it was quite messy as it was just an experimental header so maybe you should go with the normal gl.h header and if you don't want to use deprecated functionality, then simply ignore them (of course this is easier with gl3.h as if you try to use something that's deprecated, you'll end up with compilation error :D).

10-29-2010, 12:44 PM
It's been a few months since I reviewed the situation with the GL headers, but, at least a while ago, gl3.h was not a production release but just for testing purposes and explicitly not to be used for any application production release. So, I do not use it. However, when you create your OpenGL render context, you can specify, if you want to, that it be a core profile context. If you do that, as do I, then despite whatever GL header file you have, you will only be able to use the GL API functions that exist for the version of GL that you created the render context for. I think that's what you want to do.