[Interest] Attribute Qt::AA_UseOpenGLES must be set before QCoreApplication is created.
thomas at silentwings.no
Fri Oct 18 11:28:58 CEST 2019
I have a Windows WPF/C# application that uses ANGLE/OpenGL through Qt. This
works nicely and has done so for many years. However, some time around 5.12
I started getting this warning when setting up my OpenGL context:
Attribute Qt::AA_UseOpenGLES must be set before QCoreApplication is
I doesn't actually appear to have any negative consequences. Everything
works as before, but our users are complaining about the warning :)
The reason that these attributes are set after creating the QApplication is
that I have a fallback system where I can try for software rendering if the
ANGLE setup fails for some reason (crappy drivers, etc). So if my GLContext
with AA_UseOpenGLES fails, I try again with AA_UseSoftwareOpenGL. This also
appears to work nicely.
I don't actually use the QApplication for anything, I'm only using Qt as a
GL wrapper with no QML, Gui, Network or anything. So I tried to simply
remove the QGuiApplication, but then it crashes during
QOpenGLContext::create(), so I guess it needs to exist after all.
So my question is basically why this warning was introduced? Are there any
consequences here that I just haven't noticed yet? Is there a way to
disable this warning through QLoggingCategory::setFilterRules or something?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest