Priority: P2: Important
Affects Version/s: 5.15, 6.x
Fix Version/s: None
Component/s: GUI: OpenGL
I need to set the highest available GL version that I can detect on my users's computers (as they may submit their own shaders directly - which potentially use more recent features that I can expect, especially on app startup).
So, to detect what I can use, I would like to run more-or-less the following upon app startup, to try and make a context with the highest available version in descending order and stopping when I have something that works:
The problem that I encounter is:
- If I run this code before QApplication instantiation, then I get a crash because it's likely too early to create QOffscreenSurface.. makes sense.
- If I run this code after QApplication instantiation, with AA_ShareOpenGLContexts, then the shared context has already been created during QApp construction, thus it's too late.
In that case, what can I do (except resorting to platform-specific code...) ?