diff options
-rw-r--r-- | src/effects/private/qgfxshaderbuilder.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/effects/private/qgfxshaderbuilder.cpp b/src/effects/private/qgfxshaderbuilder.cpp index 22975b5..6439ff3 100644 --- a/src/effects/private/qgfxshaderbuilder.cpp +++ b/src/effects/private/qgfxshaderbuilder.cpp @@ -66,7 +66,12 @@ QGfxShaderBuilder::QGfxShaderBuilder() // thread will get the same capabilities as the render thread's OpenGL // context. Not 100% accurate, but it works... QOpenGLContext context; - context.create(); + if (!context.create()) { + qDebug() << "failed to acquire GL context to resolve capabilities, using defaults.."; + m_maxBlurSamples = 8; // minimum number of varyings in the ES 2.0 spec. + return; + } + QOffscreenSurface surface; // In very odd cases, we can get incompatible configs here unless we pass the // GL context's format on to the offscreen format. |