PDA

View Full Version : How to update my OpenGL headerfile gl.h?



ColacX
11-23-2009, 09:18 AM
according to my headerfile <gl.h> myopengl version is GL_VERSION_1_1

Also im missing the function glLoadTransposeMatrix which is available only if the GL version is 1.3 or greater.

Im on a 1 year old laptop that can play games such as Unreal Tournament 3. Shouldn't my OpenGL version be higher than 1.3?

So how to update to a never SDK version of OpenGL that my laptop supports?

Ilian Dinev
11-23-2009, 09:23 AM
http://www.opengl.org/registry/#headers

Note that some extension-procs have to be loaded with wglGetProcAddress() . The gl.h and opengl32.dll are never updated.

ColacX
11-23-2009, 09:36 AM
http://www.opengl.org/registry/#headers

Note that some extension-procs have to be loaded with wglGetProcAddress() . The gl.h and opengl32.dll are never updated. is glLoadTransposeMatrix in there somewhere?

Brolingstanz
11-23-2009, 10:42 AM
Check the technical wiki for a flotilla of examples & tutorials.

marshats
11-23-2009, 10:47 AM
glLoadTransposeMatrix* is in gl.h and you must specify one of the types either double or float ie


glLoadTransposeMatrixd( const GLdouble m[16] );
glLoadTransposeMatrixf( const GLfloat m[16] );


In the long run when you start to need extensions, might find benefit using the cross-platform extension helper library called glew (http://glew.sourceforge.net/). I find it much easier than having to use GetProcAddress queries for every extension imaginable.

Basically all you have to do is add two lines of code


#include <GL/glew.h>
... after your window is created then
glewInit();
... now extensions available for you to use!

More details on "basic usage" found here (http://glew.sourceforge.net/basic.html)

ColacX
11-23-2009, 10:58 AM
Thanks all this clarified things a bit. Just found it odd that my openGL version wasn't newer. So this is how folks do it.

marshats
11-23-2009, 11:04 AM
A foll0w up -- GLEW allows you to simplify and ignore the details as posted at Beyond Windows ogl 1.1 (http://www.gamedev.net/reference/articles/article1929.asp). It is worthwhile to read this just to see why helper libraries like GLEW are so valuable.