Added a few material flags
authorGunnar Sletta <gunnar.sletta@nokia.com>
Fri, 20 Jan 2012 09:26:17 +0000 (10:26 +0100)
committerQt by Nokia <qt-info@nokia.com>
Fri, 20 Jan 2012 12:49:47 +0000 (13:49 +0100)
Change-Id: Id324ebb82df985f1a7380761cc4923f60c7d1f20
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
src/quick/items/qquickshadereffectnode.cpp
src/quick/scenegraph/coreapi/qsgmaterial.cpp
src/quick/scenegraph/coreapi/qsgmaterial.h
src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp

index da92701..1b62222 100644 (file)
@@ -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
index 709ab6c..d010394 100644 (file)
@@ -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.
  */
 
 
index 320481f..cf437fa 100644 (file)
@@ -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)
 
index f4e85c6..d44044f 100644 (file)
@@ -189,7 +189,7 @@ QSGDistanceFieldTextMaterial::QSGDistanceFieldTextMaterial()
     : m_glyph_cache(0)
     , m_texture(0)
 {
-   setFlag(Blending, true);
+   setFlag(Blending | RequiresDeterminant, true);
 }
 
 QSGDistanceFieldTextMaterial::~QSGDistanceFieldTextMaterial()