summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-12-22 09:57:19 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-12-22 14:59:12 (GMT)
commit8908c2575b76789652aab4f623d60734707c3a54 (patch)
tree6a9ac63774e868cdc5c0e9831a88ea7854a9dfaf /src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
parentb784d4991b186037ccd2b60ae3101697a2251160 (diff)
downloadQt-8908c2575b76789652aab4f623d60734707c3a54.zip
Qt-8908c2575b76789652aab4f623d60734707c3a54.tar.gz
Qt-8908c2575b76789652aab4f623d60734707c3a54.tar.bz2
Use 3x3 PMV matrices rather than 4x4 in the GL2 engine
QGraphicsView based applications will set a new transform for every item before it's painted. This leads to lots of updates to the PMV matrix. So switching to a 3x3 rather than a 4x4 gives us less data to pass to GL for each QGraphicsItem which gets rendered. It also means the vertex shader is more efficient. However, this patch only gives a maximum 2.5% speed improvement on the SGX, which seems to be only due to the faster vertex shader rather than the reduced amount of data we pass to GL. Reviewed-By: Kim
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index 33ce24d..f1ec6e6 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -254,7 +254,7 @@ public:
GLfloat staticVertexCoordinateArray[8];
GLfloat staticTextureCoordinateArray[8];
- GLfloat pmvMatrix[4][4];
+ GLfloat pmvMatrix[3][3];
QGLEngineShaderManager* shaderManager;