From d96b93037484085cd0804b3e2ec9264bdd5adf72 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 20 Oct 2019 00:09:12 -0700 Subject: [PATCH] Qt: Try GLES 3.0 if using GLES --- src/platform/qt/Display.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/platform/qt/Display.cpp b/src/platform/qt/Display.cpp index 36b463545..3f916ec7b 100644 --- a/src/platform/qt/Display.cpp +++ b/src/platform/qt/Display.cpp @@ -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