Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: OpenGL driver support

  1. #1
    Junior Member Newbie
    Join Date
    May 2010
    Posts
    6

    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

  2. #2
    Member Regular Contributor
    Join Date
    Jan 2012
    Location
    Germany
    Posts
    303
    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.

  3. #3
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    2,891
    Quote Originally Posted by Wenhui View Post
    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.
    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).
    Last edited by Dark Photon; 07-21-2012 at 09:45 AM.

  4. #4
    Junior Member Newbie
    Join Date
    May 2010
    Posts
    6
    Quote Originally Posted by menzel View Post
    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.
    Thanks for your reply.


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

  5. #5
    Junior Member Newbie
    Join Date
    May 2010
    Posts
    6
    Quote Originally Posted by Dark Photon View Post
    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.

    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.

  6. #6
    Member Regular Contributor
    Join Date
    Jan 2012
    Location
    Germany
    Posts
    303
    Quote Originally Posted by Wenhui View Post
    Thanks for your reply.

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

    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.

  7. #7
    Junior Member Newbie
    Join Date
    May 2010
    Posts
    6
    Quote Originally Posted by menzel View Post
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •