Request for advice, testing older OpenGL contexts...

Hello,

Maybe this is a dumb question but I don’t know :slight_smile:

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.

You can request which context version you want. See {wgl,glX}CreateContextAttribs():

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

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.

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.

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.