views:

72

answers:

3

I know that if the openGl implementation does not find a suitable driver it happily falls back and render everything in software mode. It's good for graphics applications but it is not acceptable for computer games.

I know many users using Windows XP and if the user does not install the video card driver for his GPU then the OpenGL won't be hardware accelerated (while DirectX is or if not it will throw errors).

Is there a better (and possibly cross platform) way to determine if OpenGL uses the hardware acceleration than measuring the FPS and if it's too low notify the user?

I know that games like Quake3 can find it out somehow...

+2  A: 

It seems that there is no direct way to query OpenGL for this but there are some methods that may help you to determine if hardware acceleration is present. See here for Windows ideas. In a UNIX environment glxinfo | grep "direct rendering" should work.

pmr
A: 

This previous answer suggests that checking to see if the user only has OpenGL 1.1 may be sufficient.

http://stackoverflow.com/questions/126028/how-to-write-an-installer-that-checks-for-opengl-support

Kylotan
This is generally NOT sufficient. E.g. in Linux-land [Mesa3d](http://www.mesa3d.org/) implements a OpenGL 2.1 compatible software renderer.
Staffan