Add light debug view flag to draw light shapes

This commit is contained in:
Chandler Cox
2023-07-07 17:32:46 -05:00
parent ca5cbf05be
commit a0bb3f2995
10 changed files with 89 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ void Light::OnEnable()
GetSceneRendering()->AddActor(this, _sceneRenderingKey);
#if USE_EDITOR
GetSceneRendering()->AddViewportIcon(this);
GetSceneRendering()->AddLightsDebug<Light, &Light::DrawLightsDebug>(this);
#endif
// Base
@@ -36,6 +37,7 @@ void Light::OnDisable()
{
#if USE_EDITOR
GetSceneRendering()->RemoveViewportIcon(this);
GetSceneRendering()->RemoveLightsDebug<Light, &Light::DrawLightsDebug>(this);
#endif
GetSceneRendering()->RemoveActor(this, _sceneRenderingKey);
@@ -43,6 +45,12 @@ void Light::OnDisable()
Actor::OnDisable();
}
#if USE_EDITOR
void Light::DrawLightsDebug(RenderView& view)
{
}
#endif
void Light::Serialize(SerializeStream& stream, const void* otherObj)
{
// Base