summaryrefslogtreecommitdiffstats
path: root/src/render/jobs/updateboundingvolumejob.cpp
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire350@gmail.com>2015-10-14 18:26:17 +0200
committerPaul Lemire <paul.lemire@kdab.com>2015-10-20 12:28:14 +0000
commit207efae0772c6903964a13461ee392267ea76753 (patch)
tree384b097058eb14053fc0d90a790e4d2c6610fd81 /src/render/jobs/updateboundingvolumejob.cpp
parent2c80c228f22ffef310ac711d874627b207b5db6a (diff)
QRenderAspect: use a single instance of UpdadeBoundingVolumeJob
instead of creating one every frame Change-Id: I577c7c92f0c9ab00db96e8328c0f32efdb1110d6 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Diffstat (limited to 'src/render/jobs/updateboundingvolumejob.cpp')
-rw-r--r--src/render/jobs/updateboundingvolumejob.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/render/jobs/updateboundingvolumejob.cpp b/src/render/jobs/updateboundingvolumejob.cpp
index 8dee7c9a3..55fa3f155 100644
--- a/src/render/jobs/updateboundingvolumejob.cpp
+++ b/src/render/jobs/updateboundingvolumejob.cpp
@@ -94,11 +94,16 @@ void expandWorldBoundingVolume(Qt3DRender::Render::Entity *node)
}
-UpdateBoundingVolumeJob::UpdateBoundingVolumeJob(Entity *node)
- : m_node(node)
+UpdateBoundingVolumeJob::UpdateBoundingVolumeJob()
+ : m_node(Q_NULLPTR)
{
}
+void UpdateBoundingVolumeJob::setRoot(Entity *root)
+{
+ m_node = root;
+}
+
void UpdateBoundingVolumeJob::run()
{
// Expand worldBoundingVolumeWithChildren of each node that has children by the