OpenGL driver support

Recently I just move our code from “glBegin/glEnd” to “VBO/GLSL”. It works pretty well and fast.

However if user’s video card driver is older, let’s say 182 or 191, the code will crash.

Here is my question.

How can I know if my code can work on user’s machine. If not, let user update his driver.

Thanks

You can try to use glGetString with the enums GL_VERSION GL_RENDERER and GL_VENDOR to identify the driver version. These informations don’t need to include driver versions and if so, they will be at the implementation defined parts of the string (e.g. GL_VERSION will state the OpenGL context version but might also include more information after that). You can make a black-list of faulty drivers but don’t expect the driver strings to follow the same format in future different driver revisions.

The key is to identify what you’re doing on older drivers that they don’t support. It may be that you’re just assuming that you have GL 3.3 capability when in fact on certain drivers you only have 3.2 or less (for instance). Or you may be assuming the presence of an extension that isn’t supported back then. All this is easily checked for.

Looking back in time, it appears (for NVidia at least; don’t know whose vendor’s drivers you’re talking about) 182.x drivers were probably OpenGL 2.1.2 or 3.1 (depending on your GPU) and 191.x were probably OpenGL 2.1.2 or 3.2 (again, depending on your GPU). Looks like OpenGL 3.3 support came about with 256.x (with 195.36.07.0[34] being early versions of that).

Thanks for your reply.

It seems none of these three queries will always return driver info?

[QUOTE=Dark Photon;1240647]The key is to identify what you’re doing on older drivers that they don’t support. It may be that you’re just assuming that you have GL 3.3 capability when in fact on certain drivers you only have 3.2 or less (for instance). Or you may be assuming the presence of an extension that isn’t supported back then. All this is easily checked for.

Looking back in time, it appears (for NVidia at least; don’t know whose vendor’s drivers you’re talking about) 182.x drivers were probably OpenGL 2.1.2 or 3.1 (depending on your GPU) and 191.x were probably OpenGL 2.1.2 or 3.2 (again, depending on your GPU). Looks like OpenGL 3.3 support came about with 256.x (with 195.36.07.0[34] being early versions of that).[/QUOTE]

Thanks for your reply.

Happy to hear that “all this is easily checked for”.

I am mainly work on N card, however A card also need to be supported. Fortunately no bug report yet on A card.

Could you be more details please? Should I check if OpenGL version is 3.3 or higher? Or check if driver version is 256 or higher? BTW, how to get driver info?

thanks in advance.

[QUOTE=Wenhui;1240663]Thanks for your reply.

It seems none of these three queries will always return driver info?[/QUOTE]

No, identifying the driver is not guaranteed. But if your goal is to identify known drivers with known bugs, you can check if that specific drivers return unique strings. For checking OpenGL support, use the version number and the extension strings.

thanks for your info.

could you give me a example about how to the driver check and the opengl support check?

many thanks.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.