diff options
Diffstat (limited to 'src/gui/opengl/qopenglshaderprogram.cpp')
-rw-r--r-- | src/gui/opengl/qopenglshaderprogram.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp index 8278e4fb5a..c0e250b0fa 100644 --- a/src/gui/opengl/qopenglshaderprogram.cpp +++ b/src/gui/opengl/qopenglshaderprogram.cpp @@ -429,7 +429,9 @@ bool QOpenGLShader::compileSourceCode(const char *source) // The precision qualifiers are useful on OpenGL/ES systems, // but usually not present on desktop systems. const QSurfaceFormat currentSurfaceFormat = QOpenGLContext::currentContext()->format(); + QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(QOpenGLContext::currentContext()); if (currentSurfaceFormat.renderableType() == QSurfaceFormat::OpenGL + || ctx_d->workaround_missingPrecisionQualifiers #ifdef QT_OPENGL_FORCE_SHADER_DEFINES || true #endif @@ -439,7 +441,7 @@ bool QOpenGLShader::compileSourceCode(const char *source) } #ifdef QOpenGL_REDEFINE_HIGHP - if (d->shaderType == Fragment) { + if (d->shaderType == Fragment && !ctx_d->workaround_missingPrecisionQualifiers) { src.append(redefineHighp); srclen.append(GLint(sizeof(redefineHighp) - 1)); } |