summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglshaderprogram.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-08-26 23:34:59 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-08-26 23:34:59 (GMT)
commitbe9968c0ee3943c7cc169b4ad8e36155b06bf620 (patch)
treefd39afb623d7a787a42f71f148ebd051fdd51a14 /src/opengl/qglshaderprogram.cpp
parentd477cc1498ccf2204dd0e5cd6676f5c0788a9090 (diff)
parentef4c65fc364a0262389c0497092a0fa5e1f7d4c3 (diff)
downloadQt-be9968c0ee3943c7cc169b4ad8e36155b06bf620.zip
Qt-be9968c0ee3943c7cc169b4ad8e36155b06bf620.tar.gz
Qt-be9968c0ee3943c7cc169b4ad8e36155b06bf620.tar.bz2
Merge branch '4.7' of git://scm.dev.nokia.troll.no/qt/qt into 4.7
Diffstat (limited to 'src/opengl/qglshaderprogram.cpp')
-rw-r--r--src/opengl/qglshaderprogram.cpp10
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) {