How to determine OGL version?
Correct me if I''m wrong...
Under sloppy MS Windows, we only get OpenGL 1.1
but!
Hardware vendors may distribute e.g. OpenGL 1.3 drivers.
When I query the OpenGL version on my GeForce + Detonator 3
configuration I get OpenGL v1.2.1. Yet I am supposed to
get the 1.2/1.2.1 function pointers with wglGetProcAddres()?
How do I actually know that I need to do this (since Windows
OpenGL is only 1.1)? What if MS desides to get its act
together and ship OpenGL 1.3? How would I know the actual
OpenGL version I am running?
I am not really helped by the fact that my card can deliver
1.2.1, since it could just as well be 1.0, but expose all
the 1.2.1 functionality through extensions.
/Marcus
The OpenGL libraries under Windows are only version 1.0 iirc, but the version of OpenGL that you''re running is whatever your video cards drivers support. Having to access the v1.2 features through wglGetProcAddress is only needed because the libraries and header files arent upto date.
>>Under sloppy MS Windows, we only get OpenGL 1.1<<
yes
>>Hardware vendors may distribute e.g. OpenGL 1.3 drivers.<<
yes
all functions > 1.1 u will to acess through extensions this is not a hassle or difficult check my site (under extensions) for examples
>>What if MS desides to get its act
together and ship OpenGL 1.3? How would I know the actual
OpenGL version I am running?<<
the chances are slim but theres no problem if they do all your code will continue to work
eg vertex arrays were not in opengl1.0 ( they were an extension)
now today to use vertex arrays i can either go
check if this string is in the extension string "GL_EXT_vertex_array" if so i can get acess to it just like any other extension + call it so glVertexPointerEXT(..)
or cause ive got opengl1.1 (it was added to opengl1.1) i can call it with glVertexPointer(..)
yes
>>Hardware vendors may distribute e.g. OpenGL 1.3 drivers.<<
yes
all functions > 1.1 u will to acess through extensions this is not a hassle or difficult check my site (under extensions) for examples
>>What if MS desides to get its act
together and ship OpenGL 1.3? How would I know the actual
OpenGL version I am running?<<
the chances are slim but theres no problem if they do all your code will continue to work
eg vertex arrays were not in opengl1.0 ( they were an extension)
now today to use vertex arrays i can either go
check if this string is in the extension string "GL_EXT_vertex_array" if so i can get acess to it just like any other extension + call it so glVertexPointerEXT(..)
or cause ive got opengl1.1 (it was added to opengl1.1) i can call it with glVertexPointer(..)
But that is exactly what I mean. Under Windows I must write my app as if I''m using OpenGL 1.1 anyway, so why care what version of OpenGL the hw-driver supports? As it is now, I access all the 1.2+ features through extensions simply beacause I know that I must, even if glGetString( GL_VERSION ) tells me that I am running 1.2.1, which is kind of annoying to me.
By the way, does anyone know of a list of which functions/tokens are present/not present in the different versions of OpenGL (so that I do not need to compare the different OpenGL Specifications)?
/Marcus
By the way, does anyone know of a list of which functions/tokens are present/not present in the different versions of OpenGL (so that I do not need to compare the different OpenGL Specifications)?
/Marcus
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement