Is there any way in OpenGL to choose between hardware and software rendering?

Does OpenGL use hardware acceleration automatically if a driver is present?

You can’t choose directly. You can get software rendering by using features you know is unsupported by the hardware, but that’s all.

If there’s a driver present, AND the current state setup allows hardware rendering, it will be used.

How do I determine if a certain state is supported?

You can’t. But on the other hand, is it really important for you to know? Most of the time when someone asks for a way to determine hardware acceleration, all they want to know if it’s fast enough. That can only be determined by writing a test program and see for yourself.

I can check to see what hardware and the version of the openGL driver that are in use. If you know the hardware, you then know what is supported.

You can also check what extensions are supported, by the hardware or they are ATI or nvadia, etc.

Originally posted by Gamekeeper:
How do I determine if a certain state is supported?

Sorry, You’re not right. Actually there is a way to check wheather you are accelerated or not. In the Pixelformatdescriptor, that you can retrieve, there is a dwFlags member that contains PFD_GENERIC_ACCELERATED if there is any kind of hw-acceleration. Regards, Kai

The PDF_GENERIC_ACCELERATED flag only says whether a device driver or Microsoft’s software implementation is used. It does not say anything about if the device driver is performing a software rendering or letting the hardware do it.

Microsoft is software rendering, all other is hardware. Kai

Not necessarily. For example, just because you are using nVidia drivers doesn’t mean you are doing everything in hardware. Much of it may be done in hardware, but there are features where they may choose to fall back to software.