diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-08-06 13:18:19 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-12 10:43:50 +0200 |
commit | f56b68b61c8ae021526c2d433961323b7e41032c (patch) | |
tree | 295f51cfd53139b9a91307a989c62a4eaa652151 /src/quick/scenegraph/coreapi | |
parent | e14df5bb36fa16bf1f13c0b24a12dc558c5a089b (diff) |
Introduce QSGMaterial::CustomCompileStep
Nobody reimplements the virtual QSGMaterialShader::compile()
function, so we disable that code path and make it opt-in for
compatibility.
We do this, because opens up for that the renderer can do something
different, including changing the source code to allow for better
optimization.
Change-Id: Ia72f9eda7d6428e26878158ab03349f753a35c66
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/quick/scenegraph/coreapi')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgmaterial.cpp | 5 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgmaterial.h | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.cpp b/src/quick/scenegraph/coreapi/qsgmaterial.cpp index c0794d0d69..affe357799 100644 --- a/src/quick/scenegraph/coreapi/qsgmaterial.cpp +++ b/src/quick/scenegraph/coreapi/qsgmaterial.cpp @@ -601,6 +601,11 @@ QSGMaterial::~QSGMaterial() \value RequiresFullMatrix Set this flag to true if the material relies on the full matrix of the geometry nodes for rendering. + + \value CustomCompileStep Starting with Qt 5.2, the scene graph will not always call + QSGMaterialShader::compile() when its shader program is compiled and linked. + Set this flag to enforce that the function is called. + */ /*! diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.h b/src/quick/scenegraph/coreapi/qsgmaterial.h index ee8889deac..00970a5801 100644 --- a/src/quick/scenegraph/coreapi/qsgmaterial.h +++ b/src/quick/scenegraph/coreapi/qsgmaterial.h @@ -118,7 +118,9 @@ public: Blending = 0x0001, RequiresDeterminant = 0x0002, // Allow precalculated translation and 2D rotation RequiresFullMatrixExceptTranslate = 0x0004 | RequiresDeterminant, // Allow precalculated translation - RequiresFullMatrix = 0x0008 | RequiresFullMatrixExceptTranslate + RequiresFullMatrix = 0x0008 | RequiresFullMatrixExceptTranslate, + + CustomCompileStep = 0x0010 }; Q_DECLARE_FLAGS(Flags, Flag) |