diff options
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index 8a50096..0d28a49 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtOpenGL module of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -156,7 +156,7 @@ public: void updateBrushUniforms(); void updateMatrix(); void updateCompositionMode(); - void updateTextureFilter(GLenum target, GLenum wrapMode, bool smoothPixmapTransform); + void updateTextureFilter(GLenum target, GLenum wrapMode, bool smoothPixmapTransform, GLuint id = -1); void setBrush(const QBrush* brush); @@ -175,7 +175,8 @@ public: void fillStencilWithVertexArray(QGL2PEXVertexArray& vertexArray, bool useWindingFill); // ^ Calls drawVertexArrays to render into stencil buffer - void prepareForDraw(bool srcPixelsAreOpaque); + bool prepareForDraw(bool srcPixelsAreOpaque); + // ^ returns whether the current program changed or not inline void useSimpleShader(); inline QColor premultiplyColor(QColor c, GLfloat opacity); @@ -198,6 +199,7 @@ public: bool stencilBufferDirty; bool depthUniformDirty; bool simpleShaderDepthUniformDirty; + bool opacityUniformDirty; const QBrush* currentBrush; // May not be the state's brush! @@ -218,6 +220,36 @@ public: void regenerateDepthClip(); void systemStateChanged(); uint use_system_clip : 1; + + enum Uniform { + ImageTexture, + PatternColor, + GlobalOpacity, + Depth, + PmvMatrix, + MaskTexture, + FragmentColor, + LinearData, + Angle, + HalfViewportSize, + Fmp, + Fmp2MRadius2, + Inverse2Fmp2MRadius2, + InvertedTextureSize, + BrushTransform, + BrushTexture, + NumUniforms + }; + + uint location(Uniform uniform) + { + return shaderManager->getUniformLocation(uniformIdentifiers[uniform]); + } + + uint uniformIdentifiers[NumUniforms]; + GLuint lastTexture; + + bool needsSync; }; QT_END_NAMESPACE |