summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglshaderprogram.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-08-26 06:54:04 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-08-27 03:39:49 (GMT)
commitc52061e7980fcde5d59a7657a254ce00d117b611 (patch)
tree6f6b3c82d116031949ef2567cf51cc8ad73ccc45 /src/opengl/qglshaderprogram.cpp
parent843b53d2e9471310c956950606737e867888b0a1 (diff)
downloadQt-c52061e7980fcde5d59a7657a254ce00d117b611.zip
Qt-c52061e7980fcde5d59a7657a254ce00d117b611.tar.gz
Qt-c52061e7980fcde5d59a7657a254ce00d117b611.tar.bz2
Make QGLShader::ShaderType slightly more future proof by
making it into a bitmask. I'll add GeometryShader in the future Reviewed-by: Rhys Weatherley
Diffstat (limited to 'src/opengl/qglshaderprogram.cpp')
-rw-r--r--src/opengl/qglshaderprogram.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index 83578b3..8ce50cf 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -104,7 +104,7 @@ QT_BEGIN_NAMESPACE
on desktop systems. The programmer should restrict themselves
to just features that are present in GLSL/ES, and avoid
standard variable names that only work on the desktop.
-
+
\section1 Simple shader example
\code
@@ -199,8 +199,11 @@ QT_BEGIN_NAMESPACE
\value VertexShader Vertex shader written in the OpenGL Shading Language (GLSL).
\value FragmentShader Fragment shader written in the OpenGL Shading Language (GLSL).
+
\value PartialVertexShader Partial vertex shader that will be concatenated with all other partial vertex shaders at link time.
\value PartialFragmentShader Partial fragment shader that will be concatenated with all other partial fragment shaders at link time.
+
+ \omitvalue PartialShader
*/
#ifndef GL_FRAGMENT_SHADER
@@ -251,8 +254,7 @@ public:
, shader(0)
, shaderType(type)
, compiled(false)
- , isPartial(type == QGLShader::PartialVertexShader ||
- type == QGLShader::PartialFragmentShader)
+ , isPartial((type & QGLShader::PartialShader) != 0)
, hasPartialSource(false)
{
}
@@ -2960,6 +2962,7 @@ bool QGLShaderProgram::hasShaderPrograms(const QGLContext *context)
#endif
}
+
#endif
QT_END_NAMESPACE