summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2021-07-29 08:27:21 +0200
committerPaul Lemire <paul.lemire@kdab.com>2021-08-02 07:34:12 +0200
commitca43cd97277132341676d10a515419a5390c9292 (patch)
treed5d0b69bee259cf8dd607935a18e29f34e033d60
parent294bf32c29c40e0a6c4bad018f3ea5efd62742d5 (diff)
CameraLens: use ParametersDirty rather than AllDirty
AllDirty would force a lot of recomputations that aren't needed. When the CameraLens changes the only things we need to do are: - update projection matrix in the shader and the frustum culling Those things are performed in the RenderCommand update stage which is triggered with ParametersDirty Change-Id: I27241f3ec323182b19fca7e5528d851680eeec8c Pick-to: 6.2 5.15 Reviewed-by: Mike Krus <mike.krus@kdab.com>
-rw-r--r--src/render/backend/cameralens.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/backend/cameralens.cpp b/src/render/backend/cameralens.cpp
index c8d1d110b..1c85180c7 100644
--- a/src/render/backend/cameralens.cpp
+++ b/src/render/backend/cameralens.cpp
@@ -133,12 +133,12 @@ void CameraLens::syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTim
const Matrix4x4 projectionMatrix(node->projectionMatrix());
if (projectionMatrix != m_projection) {
m_projection = projectionMatrix;
- markDirty(AbstractRenderer::AllDirty);
+ markDirty(AbstractRenderer::ParameterDirty);
}
if (!qFuzzyCompare(node->exposure(), m_exposure)) {
m_exposure = node->exposure();
- markDirty(AbstractRenderer::AllDirty);
+ markDirty(AbstractRenderer::ParameterDirty);
}
const QCameraLensPrivate *d = static_cast<const QCameraLensPrivate *>(QNodePrivate::get(node));