summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2011-05-18 15:31:14 +0200
committerPaul Olav Tvete <paul.tvete@nokia.com>2011-05-18 15:31:14 +0200
commite8c95790d9d03678f9c0d30a7cc7c2edec6eba81 (patch)
tree6b636b8ae7b2e4b70e33c6e28a5833a268eba163 /src/opengl
parent5fcd60f2560e8caf495ce67028a8da8bef27acad (diff)
Add ability to work around non-standard GLES implementations
Reviewed-by: Gunnar
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qglshaderprogram.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index 4598bffabb..8ca95a88c9 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -362,17 +362,17 @@ QGLShader::ShaderType QGLShader::shaderType() const
// The precision qualifiers are useful on OpenGL/ES systems,
// but usually not present on desktop systems. Define the
// keywords to empty strings on desktop systems.
-#ifndef QT_OPENGL_ES
+#if !defined(QT_OPENGL_ES) || defined(QT_OPENGL_FORCE_SHADER_DEFINES)
#define QGL_DEFINE_QUALIFIERS 1
static const char qualifierDefines[] =
"#define lowp\n"
"#define mediump\n"
"#define highp\n";
-#endif
+
+#else
// The "highp" qualifier doesn't exist in fragment shaders
// on all ES platforms. When it doesn't exist, use "mediump".
-#ifdef QT_OPENGL_ES
#define QGL_REDEFINE_HIGHP 1
static const char redefineHighp[] =
"#ifndef GL_FRAGMENT_PRECISION_HIGH\n"