diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-04-20 11:46:42 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-04-20 11:46:42 (GMT) |
commit | 0c7348cbc5fbbd06ff6752d98e5a6506b8cb5ffa (patch) | |
tree | bc6c53a28dd7677617d731521ddba4c9c0a404fd /src/opengl/gl2paintengineex/qglengineshadermanager_p.h | |
parent | 4701bc6fa8fe47d5038ed0a86a4e6c0490c259fe (diff) | |
download | Qt-0c7348cbc5fbbd06ff6752d98e5a6506b8cb5ffa.zip Qt-0c7348cbc5fbbd06ff6752d98e5a6506b8cb5ffa.tar.gz Qt-0c7348cbc5fbbd06ff6752d98e5a6506b8cb5ffa.tar.bz2 |
Refactor opacity handling & make drawImage/drawPixmap work again
Diffstat (limited to 'src/opengl/gl2paintengineex/qglengineshadermanager_p.h')
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadermanager_p.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h index 61a62dc..8fb0d5b 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h @@ -253,6 +253,9 @@ struct QGLEngineCachedShaderProg } */ +static const GLuint QT_VERTEX_COORDS_ATTR = 0; +static const GLuint QT_TEXTURE_COORDS_ATTR = 1; + class QGLEngineShaderManager : public QObject { Q_OBJECT; @@ -266,9 +269,9 @@ public: NonPremultipliedImageSrc = Qt::TexturePattern+2 }; - // There are optimisations we can do, depending on the transform: + // There are optimisations we can do, depending on the brush transform: // 1) May not have to apply perspective-correction - // 2) Can use lower precision for vertecies + // 2) Can use lower precision for matrix void optimiseForBrushTransform(const QTransform transform); void setSrcPixelType(Qt::BrushStyle); void setSrcPixelType(PixelSrcType); // For non-brush sources, like pixmaps & images @@ -360,7 +363,7 @@ private: bool shaderProgNeedsChanging; // Current state variables which influence the choice of shader: - QTransform transform; + QTransform brushTransform; int srcPixelType; bool useGlobalOpacity; MaskType maskType; |