Add light debug view flag to draw light shapes
This commit is contained in:
@@ -65,6 +65,7 @@ class FLAXENGINE_API SceneRendering
|
||||
{
|
||||
#if USE_EDITOR
|
||||
typedef Function<void(RenderView&)> PhysicsDebugCallback;
|
||||
typedef Function<void(RenderView&)> LightsDebugCallback;
|
||||
friend class ViewportIconsRendererService;
|
||||
#endif
|
||||
public:
|
||||
@@ -95,6 +96,7 @@ public:
|
||||
private:
|
||||
#if USE_EDITOR
|
||||
Array<PhysicsDebugCallback> PhysicsDebug;
|
||||
Array<LightsDebugCallback> LightsDebug;
|
||||
Array<Actor*> ViewportIcons;
|
||||
#endif
|
||||
|
||||
@@ -153,6 +155,22 @@ public:
|
||||
PhysicsDebug.Remove(f);
|
||||
}
|
||||
|
||||
template<class T, void(T::*Method)(RenderView&)>
|
||||
FORCE_INLINE void AddLightsDebug(T* obj)
|
||||
{
|
||||
LightsDebugCallback f;
|
||||
f.Bind<T, Method>(obj);
|
||||
LightsDebug.Add(f);
|
||||
}
|
||||
|
||||
template<class T, void(T::*Method)(RenderView&)>
|
||||
void RemoveLightsDebug(T* obj)
|
||||
{
|
||||
LightsDebugCallback f;
|
||||
f.Bind<T, Method>(obj);
|
||||
LightsDebug.Remove(f);
|
||||
}
|
||||
|
||||
FORCE_INLINE void AddViewportIcon(Actor* obj)
|
||||
{
|
||||
ViewportIcons.Add(obj);
|
||||
|
||||
Reference in New Issue
Block a user