From c597d6dcfaf7dd0415aa60b1bd5c9b291c6c5e02 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sun, 7 Aug 2016 22:41:52 -0700 Subject: [PATCH] Qt: Attempt to fix display issues --- src/platform/qt/Display.cpp | 2 -- src/platform/qt/DisplayGL.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/platform/qt/Display.cpp b/src/platform/qt/Display.cpp index 2bd772836..3f20c79f6 100644 --- a/src/platform/qt/Display.cpp +++ b/src/platform/qt/Display.cpp @@ -29,7 +29,6 @@ Display* Display::create(QWidget* parent) { switch (s_driver) { #if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(USE_EPOXY) case Driver::OPENGL: - format.setVersion(3, 0); return new DisplayGL(format, parent); #endif #ifdef BUILD_GL @@ -43,7 +42,6 @@ Display* Display::create(QWidget* parent) { default: #if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(USE_EPOXY) - format.setVersion(3, 0); return new DisplayGL(format, parent); #else return new DisplayQt(parent); diff --git a/src/platform/qt/DisplayGL.cpp b/src/platform/qt/DisplayGL.cpp index 3dc43acdd..c565b545e 100644 --- a/src/platform/qt/DisplayGL.cpp +++ b/src/platform/qt/DisplayGL.cpp @@ -31,7 +31,7 @@ DisplayGL::DisplayGL(const QGLFormat& format, QWidget* parent) , m_drawThread(nullptr) , m_context(nullptr) { - m_painter = new PainterGL(format.majorVersion(), m_gl); + m_painter = new PainterGL(format.majorVersion() < 2 ? 1 : m_gl->format().majorVersion(), m_gl); m_gl->setMouseTracking(true); m_gl->setAttribute(Qt::WA_TransparentForMouseEvents); // This doesn't seem to work? }