diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-08-26 09:31:27 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-08-26 09:31:27 (GMT) |
commit | 69354f37173b7bfcf7ea0f37175a34b8766afcbb (patch) | |
tree | d5d35fbb1c5b93470b6b1aa03c359ac09695055f /src/opengl/qglshaderprogram.cpp | |
parent | 065610d14fda00057724a46e2649db6bb98aca58 (diff) | |
parent | e5aa5a9d7e97b975316b8cc18554743cccf06474 (diff) | |
download | Qt-69354f37173b7bfcf7ea0f37175a34b8766afcbb.zip Qt-69354f37173b7bfcf7ea0f37175a34b8766afcbb.tar.gz Qt-69354f37173b7bfcf7ea0f37175a34b8766afcbb.tar.bz2 |
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts:
bin/syncqt
src/opengl/qgl.cpp
tools/configure/configureapp.cpp
Diffstat (limited to 'src/opengl/qglshaderprogram.cpp')
-rw-r--r-- | src/opengl/qglshaderprogram.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index 74382b0..bc1c009 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -97,6 +97,10 @@ QT_BEGIN_NAMESPACE to just features that are present in GLSL/ES, and avoid standard variable names that only work on the desktop. + If the \c{GL_ARB_ES2_compatibility} extension is present, + then the above prefix is not added because the desktop OpenGL + implementation supports precision qualifiers. + \section1 Simple shader example \snippet doc/src/snippets/code/src_opengl_qglshaderprogram.cpp 1 @@ -394,8 +398,10 @@ bool QGLShader::compileSourceCode(const char *source) srclen.append(GLint(headerLen)); } #ifdef QGL_DEFINE_QUALIFIERS - src.append(qualifierDefines); - srclen.append(GLint(sizeof(qualifierDefines) - 1)); + if (!(QGLExtensions::glExtensions() & QGLExtensions::ES2Compatibility)) { + src.append(qualifierDefines); + srclen.append(GLint(sizeof(qualifierDefines) - 1)); + } #endif #ifdef QGL_REDEFINE_HIGHP if (d->shaderType == Fragment) { |