PDA

View Full Version : Request for advice, testing older OpenGL contexts...



tmason
10-30-2014, 02:10 AM
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.

Dark Photon
10-30-2014, 05:12 PM
You can request which context version you want. See {wgl,glX}CreateContextAttribs():

* (GLX) ARB_create_context (https://www.opengl.org/registry/specs/ARB/glx_create_context.txt)
* (WGL) ARB_create_context (https://www.opengl.org/registry/specs/ARB/wgl_create_context.txt)

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

mbentrup
10-31-2014, 01:42 AM
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.

Dark Photon
10-31-2014, 05:39 AM
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.

Nikki_k
10-31-2014, 10:59 AM
... 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.