summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/offscreen
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/offscreen')
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp
index 38d06a4131..2e9f1eec2c 100644
--- a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp
+++ b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp
@@ -87,6 +87,7 @@ bool QOffscreenX11Integration::hasCapability(QPlatformIntegration::Capability ca
switch (cap) {
case OpenGL: return true;
case ThreadedOpenGL: return true;
+ case RasterGLSurface: return true;
default: return QOffscreenIntegration::hasCapability(cap);
}
}
@@ -196,6 +197,12 @@ QOffscreenX11GLXContext::QOffscreenX11GLXContext(QOffscreenX11Info *x11, QOpenGL
d->x11 = x11;
d->format = context->format();
+ if (d->format.renderableType() == QSurfaceFormat::DefaultRenderableType)
+ d->format.setRenderableType(QSurfaceFormat::OpenGL);
+
+ if (d->format.renderableType() != QSurfaceFormat::OpenGL)
+ return;
+
d->shareContext = 0;
if (context->shareHandle())
d->shareContext = static_cast<QOffscreenX11GLXContext *>(context->shareHandle())->d->context;