diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2012-01-20 10:26:17 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-20 13:49:47 +0100 |
commit | 03df69e81bd82ca7968a3ea40314a6cc8ad52559 (patch) | |
tree | 3792a343f0cc843b715a7866d821580f259cdd23 | |
parent | 96d69b0fe409de354d369489a284677c30378787 (diff) |
Added a few material flags
Change-Id: Id324ebb82df985f1a7380761cc4923f60c7d1f20
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
-rw-r--r-- | src/quick/items/qquickshadereffectnode.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgmaterial.cpp | 6 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgmaterial.h | 4 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp | 2 |
4 files changed, 11 insertions, 3 deletions
diff --git a/src/quick/items/qquickshadereffectnode.cpp b/src/quick/items/qquickshadereffectnode.cpp index da92701770..1b6222206e 100644 --- a/src/quick/items/qquickshadereffectnode.cpp +++ b/src/quick/items/qquickshadereffectnode.cpp @@ -309,7 +309,7 @@ QQuickShaderEffectMaterial::QQuickShaderEffectMaterial(QQuickShaderEffectNode *n , m_node(node) , m_emittedLogChanged(false) { - setFlag(Blending, true); + setFlag(Blending | RequiresFullMatrix, true); } QSGMaterialType *QQuickShaderEffectMaterial::type() const diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.cpp b/src/quick/scenegraph/coreapi/qsgmaterial.cpp index 709ab6c039..d010394a76 100644 --- a/src/quick/scenegraph/coreapi/qsgmaterial.cpp +++ b/src/quick/scenegraph/coreapi/qsgmaterial.cpp @@ -471,6 +471,12 @@ QSGMaterial::~QSGMaterial() \value Blending Set this flag to true if the material requires GL_BLEND to be enabled during rendering. + + \value RequiresDeterminant Set this flag to true if the material relies on + the determinant of the matrix of the geometry nodes for rendering. + + \value RequiresFullMatrix Set this flag to true if the material relies on + the full matrix of the geometry nodes for rendering. */ diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.h b/src/quick/scenegraph/coreapi/qsgmaterial.h index 320481fec8..cf437fae81 100644 --- a/src/quick/scenegraph/coreapi/qsgmaterial.h +++ b/src/quick/scenegraph/coreapi/qsgmaterial.h @@ -113,7 +113,9 @@ class Q_QUICK_EXPORT QSGMaterial { public: enum Flag { - Blending = 0x0001 + Blending = 0x0001, + RequiresDeterminant = 0x0002, + RequiresFullMatrix = 0x0004 | RequiresDeterminant }; Q_DECLARE_FLAGS(Flags, Flag) diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp index f4e85c6daa..d44044f973 100644 --- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp +++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp @@ -189,7 +189,7 @@ QSGDistanceFieldTextMaterial::QSGDistanceFieldTextMaterial() : m_glyph_cache(0) , m_texture(0) { - setFlag(Blending, true); + setFlag(Blending | RequiresDeterminant, true); } QSGDistanceFieldTextMaterial::~QSGDistanceFieldTextMaterial() |