summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2021-07-29 08:27:21 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-02 06:25:53 +0000
commit7223a82e1422254630440bf9137a7d9f277f54b4 (patch)
tree513da1ac64f5f284f6e033f09d0da3df9c51e1d6
parent38aab373153cebc10237066657d1adfe76bf07e8 (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 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit ca43cd97277132341676d10a515419a5390c9292) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-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));