diff options
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbintegration.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbintegration.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 2ace68036b..5170ff9e10 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -190,11 +190,11 @@ QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLCont #elif defined(XCB_USE_EGL) return new QEGLXcbPlatformContext(context->format(), context->shareHandle(), screen->connection()->egl_display(), screen->connection()); -#elif defined(XCB_USE_DRI2) - return new QDri2Context(context->format(), context->shareHandle()); -#endif - qWarning("QXcbIntegration: Cannot create platform OpenGL context, none of GLX, EGL, or DRI2 are enabled"); +#else + Q_UNUSED(screen); + qWarning("QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled"); return 0; +#endif } #endif @@ -207,7 +207,13 @@ bool QXcbIntegration::hasCapability(QPlatformIntegration::Capability cap) const { switch (cap) { case ThreadedPixmaps: return true; +#if defined(XCB_USE_GLX) + case OpenGL: return m_connections.at(0)->hasGLX(); +#elif defined(XCB_USE_EGL) case OpenGL: return true; +#else + case OpenGL: return false; +#endif case ThreadedOpenGL: return false; case WindowMasks: return true; default: return QPlatformIntegration::hasCapability(cap); |