summaryrefslogtreecommitdiffstats
path: root/src/render/materialsystem/technique_p.h
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2016-09-07 10:18:51 +0200
committerPaul Lemire <paul.lemire@kdab.com>2016-11-25 16:29:52 +0000
commit00cd8b93de47b97878422c3392412d2aa0dbbed5 (patch)
tree34ba954bbf967059da2a7b745d3a087a641eb669 /src/render/materialsystem/technique_p.h
parentd9615a73455069f77e1dcdee7cbc39413703f69f (diff)
Technique: add isCompatibleWithFilters function
Will allow to simplify technique filter filtering. Required to update the creation functor Change-Id: I7e6612e3c505ca57e5cc300335b3ba4fcc514638 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/materialsystem/technique_p.h')
-rw-r--r--src/render/materialsystem/technique_p.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/render/materialsystem/technique_p.h b/src/render/materialsystem/technique_p.h
index 61e27550a..85fa09c02 100644
--- a/src/render/materialsystem/technique_p.h
+++ b/src/render/materialsystem/technique_p.h
@@ -96,6 +96,11 @@ public:
bool isCompatibleWithRenderer() const;
void setCompatibleWithRenderer(bool compatible);
+ bool isCompatibleWithFilters(const Qt3DCore::QNodeIdVector &filterKeyIds);
+
+ void setNodeManager(NodeManagers *nodeManager);
+ NodeManagers *nodeManager() const;
+
private:
void initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePtr &change) Q_DECL_FINAL;
@@ -104,6 +109,19 @@ private:
QVector<Qt3DCore::QNodeId> m_filterKeyList;
QVector<Qt3DCore::QNodeId> m_renderPasses;
bool m_isCompatibleWithRenderer;
+ NodeManagers *m_nodeManager;
+};
+
+class TechniqueFunctor : public Qt3DCore::QBackendNodeMapper
+{
+public:
+ explicit TechniqueFunctor(AbstractRenderer *renderer, NodeManagers *manager);
+ Qt3DCore::QBackendNode *create(const Qt3DCore::QNodeCreatedChangeBasePtr &change) const Q_DECL_OVERRIDE;
+ Qt3DCore::QBackendNode *get(Qt3DCore::QNodeId id) const Q_DECL_OVERRIDE;
+ void destroy(Qt3DCore::QNodeId id) const Q_DECL_OVERRIDE;
+private:
+ NodeManagers *m_manager;
+ AbstractRenderer *m_renderer;
};
} // namespace Render