mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Allow DebugDraw not to flush the draw queue
This commit is contained in:
parent
0ac3d95cb9
commit
1b2abbeaaa
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue