Qt: Try GLES 3.0 if using GLES

This commit is contained in:
Vicki Pfau 2019-10-20 00:09:12 -07:00
parent b137e459e0
commit d96b930374
1 changed files with 5 additions and 1 deletions

View File

@ -26,7 +26,11 @@ Display* Display::create(QWidget* parent) {
switch (s_driver) {
#if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(USE_EPOXY)
case Driver::OPENGL:
format.setVersion(3, 2);
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES) {
format.setVersion(3, 0);
} else {
format.setVersion(3, 2);
}
format.setProfile(QSurfaceFormat::CoreProfile);
return new DisplayGL(format, parent);
#endif