How to determine the opengl version under windows?

Go To StackoverFlow.com

3

I knew Windows comes with Opengl drivers. If I also have NVidia driver, how to termine the OpenGL version?

2012-04-05 23:07
by user705414
As Reed says, also fyi ::glGetString(GLVENDOR), ::glGetString(GLRENDERER) - Robinson 2012-04-05 23:36


3

I knew Windows comes with Opengl drivers.

Actually it doesn't. Windows comes with a OpenGL emulation. But actual OpenGL drivers are only available through the vendor original drivers.

how to termine the OpenGL version?

Create a OpenGL context and use the glGetString function to retrieve the identifying values. Of most interest are GL_VERSION and GL_RENDERER.

2012-04-05 23:50
by datenwolf


2

You can use glGetString(GL_VERSION) to retrieve the currently executing OpenGL Version.

2012-04-05 23:22
by Reed Copsey
You might want to mention that this routine will work only after OpenGL context has been created - SigTerm 2012-04-05 23:49
@SigTerm Yes - it requires a valid context - either one to be created, or wglMakeCurrent to make an existing one current - Reed Copsey 2012-04-05 23:57
Ads