From dbe6bdb546e98a4a72eb9228efc55f77b3545277 Mon Sep 17 00:00:00 2001 From: Lynix Date: Thu, 11 Aug 2016 01:03:53 +0200 Subject: [PATCH] SDK/GraphicsComponent: Fix invalidation slot disconnection in case Detach has been called Former-commit-id: efaa7d24bcde02c6b5296fd3732d3a5011ae4078 [formerly 141bc763bee78e9380ae2b419b38c57a3034849f] [formerly 458f733410b7f62a61463d02efc738f653baeee5 [formerly 5c9b322291f2e6c80538bf2ac9ddb42afb3d240f]] Former-commit-id: 910a33e54597fd059ec6db0741fd6ded38594d56 [formerly e0b2a8b16b0f7ea1f7e533fce89773f2c3caccbe] Former-commit-id: 341f70e4f541ede37e3b2197e70f4aabdb691fd5 --- SDK/include/NDK/Components/GraphicsComponent.hpp | 6 ++++-- SDK/include/NDK/Components/GraphicsComponent.inl | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/SDK/include/NDK/Components/GraphicsComponent.hpp b/SDK/include/NDK/Components/GraphicsComponent.hpp index 92aeeed2f..6e0e78604 100644 --- a/SDK/include/NDK/Components/GraphicsComponent.hpp +++ b/SDK/include/NDK/Components/GraphicsComponent.hpp @@ -35,7 +35,7 @@ namespace Ndk inline void Clear(); - inline void Detach(const Nz::InstancedRenderableRef& renderable); + inline void Detach(const Nz::InstancedRenderable* renderable); inline void EnsureBoundingVolumeUpdate() const; inline void EnsureTransformMatrixUpdate() const; @@ -75,7 +75,8 @@ namespace Ndk Renderable(Renderable&& renderable) noexcept : data(std::move(renderable.data)), renderable(std::move(renderable.renderable)), - dataUpdated(renderable.dataUpdated) + dataUpdated(renderable.dataUpdated), + renderableInvalidationSlot(std::move(renderable.renderableInvalidationSlot)), { } @@ -84,6 +85,7 @@ namespace Ndk data = std::move(r.data); dataUpdated = r.dataUpdated; renderable = std::move(r.renderable); + renderableInvalidationSlot = std::move(r.renderableInvalidationSlot); return *this; } diff --git a/SDK/include/NDK/Components/GraphicsComponent.inl b/SDK/include/NDK/Components/GraphicsComponent.inl index b38ce6dd6..a835c845d 100644 --- a/SDK/include/NDK/Components/GraphicsComponent.inl +++ b/SDK/include/NDK/Components/GraphicsComponent.inl @@ -54,7 +54,7 @@ namespace Ndk InvalidateBoundingVolume(); } - inline void GraphicsComponent::Detach(const Nz::InstancedRenderableRef& renderable) + inline void GraphicsComponent::Detach(const Nz::InstancedRenderable* renderable) { for (auto it = m_renderables.begin(); it != m_renderables.end(); ++it) {