Optimize terrain debug shape drawing by caching lines into a vertex buffer
#2841
This commit is contained in:
@@ -90,6 +90,7 @@ void SceneRendering::Draw(RenderContextBatch& renderContextBatch, DrawCategory c
|
||||
// Draw physics shapes
|
||||
if (EnumHasAnyFlags(view.Flags, ViewFlags::PhysicsDebug) || view.Mode == ViewMode::PhysicsColliders)
|
||||
{
|
||||
PROFILE_CPU_NAMED("PhysicsDebug");
|
||||
const PhysicsDebugCallback* physicsDebugData = PhysicsDebug.Get();
|
||||
for (int32 i = 0; i < PhysicsDebug.Count(); i++)
|
||||
{
|
||||
@@ -100,6 +101,7 @@ void SceneRendering::Draw(RenderContextBatch& renderContextBatch, DrawCategory c
|
||||
// Draw light shapes
|
||||
if (EnumHasAnyFlags(view.Flags, ViewFlags::LightsDebug))
|
||||
{
|
||||
PROFILE_CPU_NAMED("LightsDebug");
|
||||
const LightsDebugCallback* lightsDebugData = LightsDebug.Get();
|
||||
for (int32 i = 0; i < LightsDebug.Count(); i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user