diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-13 05:23:47 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-13 05:23:47 (GMT) |
commit | 27bc784715b3960a0d38157dd2b4f8b4913ca071 (patch) | |
tree | cb4459739342edd34785496700dec7d3f1e53e1e /src/opengl/gl2paintengineex/qglengineshadermanager_p.h | |
parent | 29dd542d079d1b2bac37357d8ea18e5622cc12dc (diff) | |
parent | 66c9d55e58fd9ee9a80270e63a8ebba52db00904 (diff) | |
download | Qt-27bc784715b3960a0d38157dd2b4f8b4913ca071.zip Qt-27bc784715b3960a0d38157dd2b4f8b4913ca071.tar.gz Qt-27bc784715b3960a0d38157dd2b4f8b4913ca071.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/opengl/gl2paintengineex/qglengineshadermanager_p.h')
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadermanager_p.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h index 34f0768..442edfe 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h @@ -274,6 +274,26 @@ public: TextureSrcWithPattern = Qt::TexturePattern+4 }; + enum Uniform { + ImageTexture, + PatternColor, + GlobalOpacity, + Depth, + PmvMatrix, + MaskTexture, + FragmentColor, + LinearData, + Angle, + HalfViewportSize, + Fmp, + Fmp2MRadius2, + Inverse2Fmp2MRadius2, + InvertedTextureSize, + BrushTransform, + BrushTexture, + NumUniforms + }; + // 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 matrix @@ -285,8 +305,7 @@ public: void setMaskType(MaskType); void setCompositionMode(QPainter::CompositionMode); - uint getUniformIdentifier(const char *uniformName); - uint getUniformLocation(uint id); + uint getUniformLocation(Uniform id); void setDirty(); // someone has manually changed the current shader program bool useCorrectShaderProg(); // returns true if the shader program needed to be changed @@ -352,6 +371,7 @@ public: TotalShaderCount, InvalidShaderName }; + /* // These allow the ShaderName enum to be used as a cache key const int mainVertexOffset = 0; @@ -391,8 +411,6 @@ private: void compileNamedShader(QGLEngineShaderManager::ShaderName name, QGLShader::ShaderType type); static const char* qglEngineShaderSourceCode[TotalShaderCount]; - - QVector<const char *> uniformIdentifiers; }; QT_END_NAMESPACE |