diff options
author | Michal Klocek <michal.klocek@qt.io> | 2019-02-08 13:51:05 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2019-02-13 11:33:31 +0000 |
commit | 652e9146ac3a28a166928f7e594dfa1c3514e912 (patch) | |
tree | 356d98916e58b885ba02b5c648d7f34c7394ead2 /src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp | |
parent | 48f5b671a3102df50115e566c01298f3e9106654 (diff) |
Fix incorrect surface type in offscreen plugin
In case we use glx backend set correct surface.
Task-number: QTBUG-63346
Change-Id: I5827bf5b8e4ed60b933c25ce234fdd4a3dd20c88
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp')
-rw-r--r-- | src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp | 7 |
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; |