winapiopenglhardwarehardware-acceleration

How to Detect Hardware Acceleration for OpenGL on Windows


Is there a Win32 API call that detects the current hardware acceleration level of a user's system? I have no need to change the setting, but I'd like to scale back the level of detail for my OpenGL display if hardware acceleration is disabled.


Solution

  • From the FAQ: How do I know my program is using hardware acceleration on a Wintel card?

    If you are using the Win32 interface (as opposed to GLUT), call DescribePixelFormat() and check the returned dwFlags bitfield. If PFD_GENERIC_ACCELERATED is clear and PFD_GENERIC_FORMAT is set, then the pixel format is only supported by the generic implementation. Hardware acceleration is not possible for this format. For hardware acceleration, you need to choose a different format.