summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/backend/managers.cpp6
-rw-r--r--src/render/backend/managers_p.h1
-rw-r--r--src/render/geometry/joint.cpp1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/render/backend/managers.cpp b/src/render/backend/managers.cpp
index 26fd68600..aa7dbb741 100644
--- a/src/render/backend/managers.cpp
+++ b/src/render/backend/managers.cpp
@@ -110,6 +110,12 @@ void JointManager::addDirtyJoint(Qt3DCore::QNodeId jointId)
m_dirtyJoints.push_back(jointHandle);
}
+void JointManager::removeDirtyJoint(Qt3DCore::QNodeId jointId)
+{
+ const HJoint jointHandle = lookupHandle(jointId);
+ m_dirtyJoints.removeAll(jointHandle);
+}
+
QVector<HJoint> JointManager::dirtyJoints()
{
return std::move(m_dirtyJoints);
diff --git a/src/render/backend/managers_p.h b/src/render/backend/managers_p.h
index b62e2f3e0..fc2a0b479 100644
--- a/src/render/backend/managers_p.h
+++ b/src/render/backend/managers_p.h
@@ -428,6 +428,7 @@ class JointManager : public Qt3DCore::QResourceManager<
{
public:
void addDirtyJoint(Qt3DCore::QNodeId jointId);
+ void removeDirtyJoint(Qt3DCore::QNodeId jointId);
QVector<HJoint> dirtyJoints();
private:
diff --git a/src/render/geometry/joint.cpp b/src/render/geometry/joint.cpp
index 9c53b8ef8..c770564f9 100644
--- a/src/render/geometry/joint.cpp
+++ b/src/render/geometry/joint.cpp
@@ -153,6 +153,7 @@ Qt3DCore::QBackendNode *JointFunctor::get(Qt3DCore::QNodeId id) const
void JointFunctor::destroy(Qt3DCore::QNodeId id) const
{
+ m_jointManager->removeDirtyJoint(id);
m_jointManager->releaseResource(id);
}