diff --git a/CHANGES b/CHANGES index b8c91aba5..07a213524 100644 --- a/CHANGES +++ b/CHANGES @@ -131,6 +131,7 @@ Misc: - Libretro: Reduce rumble callbacks - Debugger: Minor text fixes - Qt: Debugger console history + - Qt: Detect presence of GL_ARB_framebuffer_object 0.7 beta 1: (2018-09-24) - Initial beta for 0.7 diff --git a/src/platform/qt/DisplayGL.cpp b/src/platform/qt/DisplayGL.cpp index 223829432..a07da6c7f 100644 --- a/src/platform/qt/DisplayGL.cpp +++ b/src/platform/qt/DisplayGL.cpp @@ -193,8 +193,15 @@ PainterGL::PainterGL(int majorVersion, QGLWidget* parent) mGLES2Context* gl2Backend; #endif + m_gl->makeCurrent(); +#if defined(_WIN32) && defined(USE_EPOXY) + epoxy_handle_external_wglMakeCurrent(); +#endif + + QStringList extensions = QString(reinterpret_cast(glGetString(GL_EXTENSIONS))).split(' '); + #if !defined(_WIN32) || defined(USE_EPOXY) - if (majorVersion >= 2) { + if (extensions.contains("GL_ARB_framebuffer_object") && majorVersion >= 2) { gl2Backend = static_cast(malloc(sizeof(mGLES2Context))); mGLES2ContextCreate(gl2Backend); m_backend = &gl2Backend->d; @@ -215,10 +222,6 @@ PainterGL::PainterGL(int majorVersion, QGLWidget* parent) painter->m_gl->swapBuffers(); }; - m_gl->makeCurrent(); -#if defined(_WIN32) && defined(USE_EPOXY) - epoxy_handle_external_wglMakeCurrent(); -#endif m_backend->init(m_backend, reinterpret_cast(m_gl->winId())); #if !defined(_WIN32) || defined(USE_EPOXY) if (m_supportsShaders) {