Qt: Fix non-GL1 build
Jeffrey Pfau jeffrey@endrift.com
Thu, 05 Nov 2015 22:29:48 -0800
1 files changed,
6 insertions(+),
3 deletions(-)
jump to
M
src/platform/qt/DisplayGL.cpp
→
src/platform/qt/DisplayGL.cpp
@@ -160,6 +160,7 @@ , m_started(false)
, m_context(nullptr) , m_shaders(nullptr) , m_nShaders(0) + , m_backend(nullptr) , m_messagePainter(nullptr) { #ifdef BUILD_GL@@ -175,15 +176,17 @@ gl2Backend = new GBAGLES2Context;
GBAGLES2ContextCreate(gl2Backend); m_backend = &gl2Backend->d; m_supportsShaders = true; - } else { -#else - { + } #endif + +#ifdef BUILD_GL + if (!m_backend) { glBackend = new GBAGLContext; GBAGLContextCreate(glBackend); m_backend = &glBackend->d; m_supportsShaders = false; } +#endif m_backend->swap = [](VideoBackend* v) { PainterGL* painter = static_cast<PainterGL*>(v->user); painter->m_gl->swapBuffers();