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 5 of 5

Thread: Request for advice, testing older OpenGL contexts...

  1. #1
    Junior Member Regular Contributor
    Join Date
    Apr 2014
    Posts
    109

    Request for advice, testing older OpenGL contexts...

    Hello,

    Maybe this is a dumb question but I don't know

    I am getting a new Dev system because my old one is dying but the reason I need my older system is because it has OpenGL 3.1

    So essentially I need a way to make sure that applications I write will work on older contexts.

    Is this simply a matter of setting a window hint/option within a library to request an older context to test against?

    Or is there something else involved?

    Thank you for your time.

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,169
    You can request which context version you want. See {wgl,glX}CreateContextAttribs():

    * (GLX) ARB_create_context
    * (WGL) ARB_create_context

    You can also request whether you want core or compatibility, debug, and other global context state settings.

  3. #3
    Member Regular Contributor
    Join Date
    Dec 2009
    Posts
    251
    Actually you can only request a context that is backward compatible to the specified version, but you cannot prevent the driver from creating a higher version.

    Even if you could request a version 3.1 context, all the functionalilty up to OpenGL 4.5 could by accessed from 3.1 via ARB extensions, so you cannot test that the program would run on hardware that supports only pure OpenGL 3.1.

  4. #4
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,169
    Good point. However, the takeaway is that you can do development for a back version of OpenGL by explicitly creating a context that supports that version, but yes you should still do regression testing on a driver/GPU that is limited to the version your testing.

  5. #5
    Intern Contributor
    Join Date
    Mar 2014
    Posts
    65
    Quote Originally Posted by Dark Photon View Post
    ... by explicitly creating a context that supports that version...
    That context still isn't proper.

    For example, when I create a GL 3.1 context on my Geforce 550Ti I still have all the extensions up to GL 4.5 which means that despite the low version number all the functionality of later GL versions is present. That is useless for testing.

Tags for this Thread

Posting Permissions

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