开发者

How to tell whether an OpenGL context is hardware accelerated?

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 (whil开发者_如何学Pythone 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...


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.


See also glGetString and 5.040 How do I know my program is using hardware acceleration on a Wintel card?


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

How to write an installer that checks for openGL support?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜