From 5095630d707f1fb14865e914c11be1217f0037ec 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: fac026c7d261e04d8eb8917f02d3a46395a6e56d [formerly dcdf872f4eaee1dc1fc233e7f3493bb748368dd3] [formerly b097f3fa371eaa1b99614abd5752cff34393eb26 [formerly 47d61b32b37091c6c407b5337a93d1d056fffc06]] Former-commit-id: b6acb3795bec98d7c11f29970f3530c0a3c00fe2 [formerly df3ebb81912426ea81e1b94ff751437ce5cdbc46] Former-commit-id: 7c085e0d37dbe2fecfc9db5507985ae64f861767 --- 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) {