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 <laszlo.agocs@digia.com>
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;