summaryrefslogtreecommitdiffstats
path: root/src/render/jobs/frustumcullingjob_p.h
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2016-06-03 11:57:20 +0200
committerPaul Lemire <paul.lemire@kdab.com>2016-07-04 06:09:25 +0000
commit70dfe10ef9c4745bbf7253c0917a7b5b4120f240 (patch)
treec52c55163e5e0ccfd753574510bfbd1d4bf7464b /src/render/jobs/frustumcullingjob_p.h
parent496797fea24e86388eb8ceb9ad257c94c79c72ae (diff)
Further job improvements
The RenderViewInitialization job used to have to wait for the world transform job to be completed because it was used to set the viewProjectionMatrix. This patch adjust dependencies and adds a new job that sets the viewProjectionMatrix once the transform update job is complete. This allows to start most of the processing earlier and better use the available cpu cores. Change-Id: I77d751e0b20639934cc00be0cd9888f41f684f89 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/jobs/frustumcullingjob_p.h')
-rw-r--r--src/render/jobs/frustumcullingjob_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/render/jobs/frustumcullingjob_p.h b/src/render/jobs/frustumcullingjob_p.h
index c8149346f..087b7687c 100644
--- a/src/render/jobs/frustumcullingjob_p.h
+++ b/src/render/jobs/frustumcullingjob_p.h
@@ -70,6 +70,7 @@ public:
FrustumCullingJob();
inline void setRoot(Entity *root) Q_DECL_NOTHROW { m_root = root; }
+ inline void setActive(bool active) Q_DECL_NOTHROW { m_active = active; }
inline void setViewProjection(const QMatrix4x4 &viewProjection) Q_DECL_NOTHROW { m_viewProjection = viewProjection; }
QVector<Entity *> visibleEntities() const Q_DECL_NOTHROW { return m_visibleEntities; }
@@ -81,6 +82,7 @@ private:
QMatrix4x4 m_viewProjection;
Entity *m_root;
QVector<Entity *> m_visibleEntities;
+ bool m_active;
};
typedef QSharedPointer<FrustumCullingJob> FrustumCullingJobPtr;