diff --git a/Engine/source/gfx/sim/debugDraw.cpp b/Engine/source/gfx/sim/debugDraw.cpp index 2625d1ebe..8a591fc26 100644 --- a/Engine/source/gfx/sim/debugDraw.cpp +++ b/Engine/source/gfx/sim/debugDraw.cpp @@ -210,7 +210,7 @@ void DebugDrawer::drawTransformedBoxOutline(const Point3F &a, const Point3F &b, drawLine(point3, point7, color); } -void DebugDrawer::render() +void DebugDrawer::render(bool clear) { #ifdef ENABLE_DEBUGDRAW if(!isDrawing) @@ -335,7 +335,7 @@ void DebugDrawer::render() shouldToggleFreeze = false; } - if(p->dieTime <= curTime && !isFrozen && p->dieTime != U32_MAX) + if(clear && p->dieTime <= curTime && !isFrozen && p->dieTime != U32_MAX) { *walk = p->next; mPrimChunker.free(p); diff --git a/Engine/source/gfx/sim/debugDraw.h b/Engine/source/gfx/sim/debugDraw.h index bfc2b6547..ddaba1164 100644 --- a/Engine/source/gfx/sim/debugDraw.h +++ b/Engine/source/gfx/sim/debugDraw.h @@ -105,7 +105,9 @@ public: static void init(); /// Called globally to render debug draw state. Also does state updates. - void render(); + void render(bool clear=true); + + bool willDraw() { return isDrawing && mHead; } void toggleFreeze() { shouldToggleFreeze = true; }; void toggleDrawing()