diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2021-07-29 08:27:21 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-08-02 07:25:52 +0000 |
commit | 9a71b752d0bd8a0f21982094ef2f6986ea9ded12 (patch) | |
tree | 83617662b9db561849d81c8df7a95458ed0a0c42 | |
parent | 922053967356e637c3090ee59f090df34a986c6b (diff) | |
download | qt3d-9a71b752d0bd8a0f21982094ef2f6986ea9ded12.tar.gz |
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.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/backend/cameralens.cpp b/src/render/backend/cameralens.cpp index e1b3e96d9..2a1f2f5a9 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)); |