Sdk/GraphicsComponent: Invalidates culling when adding/removing renderables

This commit is contained in:
Jérôme Leclercq
2018-09-07 13:34:55 +02:00
parent b019fc4f6d
commit 02383b1c0b
3 changed files with 12 additions and 4 deletions

View File

@@ -93,6 +93,8 @@ namespace Ndk
UnregisterMaterial(renderable->GetMaterial(i));
m_renderables.erase(it);
ForceCullingInvalidation();
break;
}
}
@@ -255,6 +257,12 @@ namespace Ndk
* \brief Invalidates the bounding volume
*/
inline void GraphicsComponent::ForceCullingInvalidation()
{
for (CullingBoxEntry& entry : m_cullingBoxEntries)
entry.listEntry.ForceInvalidation(); //< Invalidate render queues
}
inline void GraphicsComponent::InvalidateAABB() const
{
m_boundingVolumesUpdated = false;