From 0f99419487ab56de9f004cf57a0f2ef97d7b6c13 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 27 May 2019 11:46:13 -0700 Subject: [PATCH] Qt: Fix loading shaders while game is not running --- include/mgba/internal/gba/renderers/gl.h | 1 + src/platform/qt/DisplayGL.cpp | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/mgba/internal/gba/renderers/gl.h b/include/mgba/internal/gba/renderers/gl.h index 7194fcfe9..1d4627e9a 100644 --- a/include/mgba/internal/gba/renderers/gl.h +++ b/include/mgba/internal/gba/renderers/gl.h @@ -45,6 +45,7 @@ struct GBAVideoGLBackground { GLuint fbo; GLuint tex; GLuint flags; + GLuint scanlineTex; unsigned index; int enabled; diff --git a/src/platform/qt/DisplayGL.cpp b/src/platform/qt/DisplayGL.cpp index 709abd146..ddf4c211c 100644 --- a/src/platform/qt/DisplayGL.cpp +++ b/src/platform/qt/DisplayGL.cpp @@ -49,7 +49,6 @@ DisplayGL::DisplayGL(const QSurfaceFormat& format, QWidget* parent) #endif auto version = m_gl->format().version(); QStringList extensions = QString(reinterpret_cast(glGetString(GL_EXTENSIONS))).split(' '); - m_gl->doneCurrent(); if ((version == qMakePair(2, 1) && !extensions.contains("GL_ARB_framebuffer_object")) || version == qMakePair(2, 0)) { QSurfaceFormat newFormat(format); @@ -279,7 +278,6 @@ PainterGL::PainterGL(VideoProxy* proxy, QWindow* surface, QOpenGLContext* parent m_shader.preprocessShader = static_cast(&reinterpret_cast(m_backend)->initialShader); } #endif - m_gl->doneCurrent(); m_backend->user = this; m_backend->filter = false;