diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-03-16 11:23:51 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-03-16 12:35:15 (GMT) |
commit | c066afa4bc95ac92185e9fc691b9d9d27ca64387 (patch) | |
tree | 73ad6740f2033039da92b39e596f5159ab948da3 /src/opengl/gl2paintengineex/qglengineshadersource_p.h | |
parent | e0dd5b450e1b04feb6c72a3c635c586b244392da (diff) | |
download | Qt-c066afa4bc95ac92185e9fc691b9d9d27ca64387.zip Qt-c066afa4bc95ac92185e9fc691b9d9d27ca64387.tar.gz Qt-c066afa4bc95ac92185e9fc691b9d9d27ca64387.tar.bz2 |
Implement a special case, simplified vertex shader for complex geometry
When drawing text, the vertex count will most likely be so high that
using a uniform-based, simpler vertex shader is faster. We implement
the ability to inform the shader manager that the geometry is considered
complex, so that it can choose the simpler vertex shader in these cases.
Task-number: QT-2887
Reviewed-by: tom
Diffstat (limited to 'src/opengl/gl2paintengineex/qglengineshadersource_p.h')
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadersource_p.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h index c88c041..3379296 100644 --- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h @@ -107,6 +107,14 @@ static const char* const qglslPositionOnlyVertexShader = "\n\ gl_Position = vec4(transformedPos.xy, 0.0, transformedPos.z); \n\ }\n"; +static const char* const qglslComplexGeometryPositionOnlyVertexShader = "\n\ + uniform highp mat3 matrix; \n\ + attribute highp vec2 vertexCoordsArray; \n\ + void setPosition(void) \n\ + { \n\ + gl_Position = vec4(matrix * vec3(vertexCoordsArray, 1), 1);\n\ + } \n"; + static const char* const qglslUntransformedPositionVertexShader = "\n\ attribute highp vec4 vertexCoordsArray; \n\ void setPosition(void) \n\ |