diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-01-20 09:18:32 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-01-21 12:28:58 (GMT) |
commit | 3a8236a01f89882d91e22a336f1e7134d3a84b68 (patch) | |
tree | 0fffca58e99c76092ccedfaf36157d0a48b9f4c4 /src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | |
parent | 1729c2baea4e39f97d71b77f4c25af131f23221c (diff) | |
download | Qt-3a8236a01f89882d91e22a336f1e7134d3a84b68.zip Qt-3a8236a01f89882d91e22a336f1e7134d3a84b68.tar.gz Qt-3a8236a01f89882d91e22a336f1e7134d3a84b68.tar.bz2 |
Use an attribute value for the PMV matrix rather than a uniform
This has several advantages: First, updating an attribute value
seems to be cheaper than updating a uniform. Second, vertex atribute
values are independent of shader program, which means they persist
across changing of the shader program. This makes code simpler and
reduces GL state changes. Note: Credit goes to Samuel for finding
this little gem. :-)
For the 25920 solid QGraphicsRectItem test case, this gives 10%
improvement on desktop and 27% on the SGX.
Reviewed-By: Kim
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index ce1b538..8fa0eff 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -252,8 +252,6 @@ public: bool compositionModeDirty; bool brushTextureDirty; bool brushUniformsDirty; - bool simpleShaderMatrixUniformDirty; - bool shaderMatrixUniformDirty; bool opacityUniformDirty; bool stencilClean; // Has the stencil not been used for clipping so far? |