diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-05-01 13:05:51 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-05-01 13:08:42 +0200 |
commit | ccc6efb6e91756451ffd50d51f7f3ae05bc6df0b (patch) | |
tree | a65fb418e4e0ce27e6cd73f65500e7cc00bbf106 /src/gui/opengl/qopenglshaderprogram.cpp | |
parent | d52b00e1d3cc60c81b54a89d6da488dc4bbce384 (diff) | |
parent | 079f2bf5d8a4221b821ec8062affe2efaa9668a0 (diff) |
Merge remote-tracking branch 'origin/release' into stable
This merge adds the opengl rename.
Change-Id: I84ea0b6abee9780ebb2cf3f64ab9e3fdf2acab3e
Diffstat (limited to 'src/gui/opengl/qopenglshaderprogram.cpp')
-rw-r--r-- | src/gui/opengl/qopenglshaderprogram.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp index 58cb60ed92..6e85e5eb4b 100644 --- a/src/gui/opengl/qopenglshaderprogram.cpp +++ b/src/gui/opengl/qopenglshaderprogram.cpp @@ -176,7 +176,7 @@ public: #endif { #ifndef QT_OPENGL_ES_2 - if (!ctx->isES()) { + if (!ctx->isOpenGLES()) { QSurfaceFormat f = ctx->format(); // Geometry shaders require OpenGL >= 3.2 @@ -445,7 +445,7 @@ bool QOpenGLShader::compileSourceCode(const char *source) #ifdef QOpenGL_REDEFINE_HIGHP if (d->shaderType == Fragment && !ctx_d->workaround_missingPrecisionQualifiers - && QOpenGLContext::currentContext()->isES()) { + && QOpenGLContext::currentContext()->isOpenGLES()) { src.append(redefineHighp); srclen.append(GLint(sizeof(redefineHighp) - 1)); } @@ -674,7 +674,7 @@ bool QOpenGLShaderProgram::init() #ifndef QT_OPENGL_ES_2 // Resolve OpenGL 4 functions for tessellation shader support QSurfaceFormat format = context->format(); - if (!context->isES() + if (!context->isOpenGLES() && format.version() >= qMakePair<int, int>(4, 0)) { d->tessellationFuncs = context->versionFunctions<QOpenGLFunctions_4_0_Core>(); d->tessellationFuncs->initializeOpenGLFunctions(); @@ -3328,7 +3328,7 @@ bool QOpenGLShader::hasOpenGLShaders(ShaderType type, QOpenGLContext *context) #ifndef QT_OPENGL_ES_2 // Geometry shaders require OpenGL 3.2 or newer QSurfaceFormat format = context->format(); - return (!context->isES()) + return (!context->isOpenGLES()) && (format.version() >= qMakePair<int, int>(3, 2)); #else // No geometry shader support in OpenGL ES2 @@ -3336,7 +3336,7 @@ bool QOpenGLShader::hasOpenGLShaders(ShaderType type, QOpenGLContext *context) #endif } else if (type == TessellationControl || type == TessellationEvaluation) { #if !defined(QT_OPENGL_ES_2) - return (!context->isES()) + return (!context->isOpenGLES()) && (format.version() >= qMakePair<int, int>(4, 0)); #else // No tessellation shader support in OpenGL ES2 |