aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <[email protected]>2014-07-30 16:31:36 +0200
committerGunnar Sletta <[email protected]>2014-07-31 08:44:43 +0200
commit93fe03a1c583b4b090948bf8d4d7e93cb8da4880 (patch)
treeb3ee1a3e411c14457292b15fe1bed7620cb3c42b
parente194308ee5d26aadd294ab49abb998a52c2a2ca4 (diff)
Use the current context to resolve extensions.
When updating the code to not use direct gl calls, this code was changed to use the context's gl context. The context doesn't have a context when the rendering happens on the same thread as the scene graph rendering and we get a crash. Change-Id: I8adf62c0ed12bb055982a71ba59af76afeefcca1 Reviewed-by: Laszlo Agocs <[email protected]>
-rw-r--r--src/quick/items/context2d/qquickcontext2dtexture.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/context2d/qquickcontext2dtexture.cpp b/src/quick/items/context2d/qquickcontext2dtexture.cpp
index 19071ba01f..0ab76b0ca5 100644
--- a/src/quick/items/context2d/qquickcontext2dtexture.cpp
+++ b/src/quick/items/context2d/qquickcontext2dtexture.cpp
@@ -479,7 +479,7 @@ bool QQuickContext2DFBOTexture::doMultisampling() const
static bool multisamplingSupported = false;
if (!extensionsChecked) {
- const QSet<QByteArray> extensions = m_context->glContext()->extensions();
+ const QSet<QByteArray> extensions = QOpenGLContext::currentContext()->extensions();
multisamplingSupported = extensions.contains(QByteArrayLiteral("GL_EXT_framebuffer_multisample"))
&& extensions.contains(QByteArrayLiteral("GL_EXT_framebuffer_blit"));
extensionsChecked = true;