Graphics/RenderSystem: Fix light removal
This commit is contained in:
parent
de7fee348a
commit
d113b58b5a
|
|
@ -199,10 +199,9 @@ namespace Nz
|
|||
m_newlyHiddenLightEntities.erase(entity);
|
||||
m_newlyVisibleLightEntities.erase(entity);
|
||||
|
||||
GraphicsComponent& entityGfx = registry.get<GraphicsComponent>(entity);
|
||||
const WorldInstancePtr& worldInstance = entityGfx.GetWorldInstance();
|
||||
for (const auto& renderableEntry : entityGfx.GetRenderables())
|
||||
m_pipeline->UnregisterInstancedDrawable(worldInstance, renderableEntry.renderable.get());
|
||||
LightComponent& entityLight = registry.get<LightComponent>(entity);
|
||||
for (const auto& lightEntry : entityLight.GetLights())
|
||||
m_pipeline->UnregisterLight(lightEntry.light.get());
|
||||
}
|
||||
|
||||
void RenderSystem::OnNodeDestroy(entt::registry& registry, entt::entity entity)
|
||||
|
|
|
|||
Loading…
Reference in New Issue