Posted by: Morten Nobel-Jørgensen | February 28, 2010

OpenGL info


This small application shows the OpenGL version that your driver and graphics card support. It also shows detail about the renderer and the vendor. The version of the OpenGL Shading Language (GLSL) is also showed. Finally a list of the supported OpenGL extensions is showed.

Screenshot of the application

As far as I know, it is a bit tricky to see this version information, unless you are a programmer. So I created this small Java Webstart application to expose this information.

Your graphics card most likely supports a lot of extensions. To give you an idea of what each extension means, I have bundled the official description from the OpenGL Extension Registry. To see the description, simply click on the extension.

To launch the program click here:

Edit 23 okt. 2011: Since JOGL is no longer maintained at the java.net, there is currently no webstart demo available.

Implementation

It is very easy to query the OpenGL info about version and extensions. The following code snipped (in Java/JOGL) is basically all you need:

String glVersion = gl.glGetString(GL.GL_VERSION);
String glRenderer = gl.glGetString(GL.GL_RENDERER);
String glVendor = gl.glGetString(GL.GL_VENDOR);
String glShadingLanguageVersion = gl.glGetString(GL.GL_SHADING_LANGUAGE_VERSION);
String glExtensions = gl.glGetString(GL.GL_EXTENSIONS);

The extension string is a space delimited string containing all the supported extensions.

I have downloaded all the extension specifications and serialized them into a lookup table. This makes lookup of extension very fast (and also allows the Java webstart to run within the sandbox). However this also means if Khronos deside to modify the set of OpenGL extensions, you need to build the application yourself to get the latest changes.

You can download the full source code here:

http://www.nobel-joergensen.com/java/projects/openglinfo/openglinfo_src.zip

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: