diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-04-20 11:57:42 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-04-20 11:57:42 (GMT) |
commit | b2f319ccdd2b4fda28e3fdb2128be75c97da75ee (patch) | |
tree | 57d26711df9efbe5914b37cf711af0d1cd55adf2 /src/opengl | |
parent | 0c7348cbc5fbbd06ff6752d98e5a6506b8cb5ffa (diff) | |
download | Qt-b2f319ccdd2b4fda28e3fdb2128be75c97da75ee.zip Qt-b2f319ccdd2b4fda28e3fdb2128be75c97da75ee.tar.gz Qt-b2f319ccdd2b4fda28e3fdb2128be75c97da75ee.tar.bz2 |
Kill unused SimpleVertexShader & rename vertex coords array
Rename inputVertex -> vertexCoordsArray to be more consistent with other
vertex attribute array naming conventions.
SimpleVertexShader has also been replaced with a combination of
MainVertexShader & PositionOnlyVertexShader, so can be killed.
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadermanager.cpp | 1 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadermanager_p.h | 2 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadersource_p.h | 32 |
3 files changed, 12 insertions, 23 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp index 15d4a9d..a4d8b77 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp @@ -78,7 +78,6 @@ QGLEngineShaderManager::QGLEngineShaderManager(QGLContext* context) const char** code = qglEngineShaderSourceCode; // shortcut - code[SimpleVertexShader] = qglslSimpleVertexShader; code[MainVertexShader] = qglslMainVertexShader; code[MainWithTexCoordsVertexShader] = qglslMainWithTexCoordsVertexShader; diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h index 8fb0d5b..dec8f56 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h @@ -87,7 +87,6 @@ correction is needed and a simpler vertex shader can be used instead. So there are the following "main" vertex shaders: - qglslSimpleVertexShader qglslMainVertexShader qglslMainWithTexCoordsVertexShader @@ -287,7 +286,6 @@ public: QGLShaderProgram* simpleProgram(); // Used to draw into e.g. stencil buffers enum ShaderName { - SimpleVertexShader, MainVertexShader, MainWithTexCoordsVertexShader, diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h index 2c284cb..2da993a 100644 --- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h @@ -63,14 +63,6 @@ QT_BEGIN_NAMESPACE QT_MODULE(OpenGL) -static const char* const qglslSimpleVertexShader = "\ - attribute highp vec4 inputVertex;\ - uniform highp mat4 pmvMatrix;\ - void main(void)\ - {\ - gl_Position = pmvMatrix * inputVertex;\ - }"; - static const char* const qglslMainVertexShader = "\ void setPosition();\ void main(void)\ @@ -90,24 +82,24 @@ static const char* const qglslMainWithTexCoordsVertexShader = "\ static const char* const qglslPositionOnlyVertexShader = "\ - attribute highp vec4 inputVertex;\ + attribute highp vec4 vertexCoordsArray;\ uniform highp mat4 pmvMatrix;\ void setPosition(void)\ {\ - gl_Position = pmvMatrix * inputVertex;\ + gl_Position = pmvMatrix * vertexCoordsArray;\ }"; // Pattern Brush - This assumes the texture size is 8x8 and thus, the inverted size is 0.125 static const char* const qglslPositionWithPatternBrushVertexShader = "\ - attribute highp vec4 inputVertex; \ + attribute highp vec4 vertexCoordsArray; \ uniform highp mat4 pmvMatrix; \ uniform mediump vec2 halfViewportSize; \ uniform mediump vec2 invertedTextureSize; \ uniform mediump mat3 brushTransform; \ varying mediump vec2 patternTexCoords; \ void setPosition(void) { \ - gl_Position = pmvMatrix * inputVertex;\ + gl_Position = pmvMatrix * vertexCoordsArray;\ gl_Position.xy = gl_Position.xy / gl_Position.w; \ mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \ @@ -132,14 +124,14 @@ static const char* const qglslPatternBrushSrcFragmentShader = "\ // Linear Gradient Brush static const char* const qglslPositionWithLinearGradientBrushVertexShader = "\ - attribute highp vec4 inputVertex; \ + attribute highp vec4 vertexCoordsArray; \ uniform highp mat4 pmvMatrix; \ uniform mediump vec2 halfViewportSize; \ uniform highp vec3 linearData; \ uniform highp mat3 brushTransform; \ varying mediump float index ; \ void setPosition() { \ - gl_Position = pmvMatrix * inputVertex;\ + gl_Position = pmvMatrix * vertexCoordsArray;\ gl_Position.xy = gl_Position.xy / gl_Position.w; \ mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \ @@ -163,14 +155,14 @@ static const char* const qglslLinearGradientBrushSrcFragmentShader = "\ // Conical Gradient Brush static const char* const qglslPositionWithConicalGradientBrushVertexShader = "\ - attribute highp vec4 inputVertex;\ + attribute highp vec4 vertexCoordsArray;\ uniform highp mat4 pmvMatrix;\ uniform mediump vec2 halfViewportSize; \ uniform highp mat3 brushTransform; \ varying highp vec2 A; \ void setPosition(void)\ {\ - gl_Position = pmvMatrix * inputVertex;\ + gl_Position = pmvMatrix * vertexCoordsArray;\ gl_Position.xy = gl_Position.xy / gl_Position.w; \ mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \ @@ -200,7 +192,7 @@ static const char* const qglslConicalGradientBrushSrcFragmentShader = "\n\ // Radial Gradient Brush static const char* const qglslPositionWithRadialGradientBrushVertexShader = "\ - attribute highp vec4 inputVertex;\ + attribute highp vec4 vertexCoordsArray;\ uniform highp mat4 pmvMatrix;\ uniform mediump vec2 halfViewportSize; \ uniform highp mat3 brushTransform; \ @@ -209,7 +201,7 @@ static const char* const qglslPositionWithRadialGradientBrushVertexShader = "\ varying highp vec2 A; \ void setPosition(void) \ {\ - gl_Position = pmvMatrix * inputVertex;\ + gl_Position = pmvMatrix * vertexCoordsArray;\ gl_Position.xy = gl_Position.xy / gl_Position.w; \ mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \ @@ -238,14 +230,14 @@ static const char* const qglslRadialGradientBrushSrcFragmentShader = "\ // Texture Brush static const char* const qglslPositionWithTextureBrushVertexShader = "\ - attribute highp vec4 inputVertex; \ + attribute highp vec4 vertexCoordsArray; \ uniform highp mat4 pmvMatrix; \ uniform mediump vec2 halfViewportSize; \ uniform mediump vec2 invertedTextureSize; \ uniform mediump mat3 brushTransform; \ varying mediump vec2 brushTextureCoords; \ void setPosition(void) { \ - gl_Position = pmvMatrix * inputVertex;\ + gl_Position = pmvMatrix * vertexCoordsArray;\ gl_Position.xy = gl_Position.xy / gl_Position.w; \ mediump vec2 viewportCoords = (gl_Position.xy + 1.0) * halfViewportSize; \ mediump vec3 hTexCoords = brushTransform * vec3(viewportCoords, 1); \ |