From 652e9146ac3a28a166928f7e594dfa1c3514e912 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Fri, 8 Feb 2019 13:51:05 +0100 Subject: 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 --- src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp') 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(context->shareHandle())->d->context; -- cgit v1.2.3