mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix loading shaders while game is not running
This commit is contained in:
parent
47bf26ff73
commit
0f99419487
|
@ -45,6 +45,7 @@ struct GBAVideoGLBackground {
|
||||||
GLuint fbo;
|
GLuint fbo;
|
||||||
GLuint tex;
|
GLuint tex;
|
||||||
GLuint flags;
|
GLuint flags;
|
||||||
|
GLuint scanlineTex;
|
||||||
|
|
||||||
unsigned index;
|
unsigned index;
|
||||||
int enabled;
|
int enabled;
|
||||||
|
|
|
@ -49,7 +49,6 @@ DisplayGL::DisplayGL(const QSurfaceFormat& format, QWidget* parent)
|
||||||
#endif
|
#endif
|
||||||
auto version = m_gl->format().version();
|
auto version = m_gl->format().version();
|
||||||
QStringList extensions = QString(reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS))).split(' ');
|
QStringList extensions = QString(reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS))).split(' ');
|
||||||
m_gl->doneCurrent();
|
|
||||||
|
|
||||||
if ((version == qMakePair(2, 1) && !extensions.contains("GL_ARB_framebuffer_object")) || version == qMakePair(2, 0)) {
|
if ((version == qMakePair(2, 1) && !extensions.contains("GL_ARB_framebuffer_object")) || version == qMakePair(2, 0)) {
|
||||||
QSurfaceFormat newFormat(format);
|
QSurfaceFormat newFormat(format);
|
||||||
|
@ -279,7 +278,6 @@ PainterGL::PainterGL(VideoProxy* proxy, QWindow* surface, QOpenGLContext* parent
|
||||||
m_shader.preprocessShader = static_cast<void*>(&reinterpret_cast<mGLES2Context*>(m_backend)->initialShader);
|
m_shader.preprocessShader = static_cast<void*>(&reinterpret_cast<mGLES2Context*>(m_backend)->initialShader);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
m_gl->doneCurrent();
|
|
||||||
|
|
||||||
m_backend->user = this;
|
m_backend->user = this;
|
||||||
m_backend->filter = false;
|
m_backend->filter = false;
|
||||||
|
|
Loading…
Reference in New Issue