mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Allow DebugDraw not to flush the draw queue
This commit is contained in:
parent
0ac3d95cb9
commit
1b2abbeaaa
2 changed files with 5 additions and 3 deletions
|
|
@ -210,7 +210,7 @@ void DebugDrawer::drawTransformedBoxOutline(const Point3F &a, const Point3F &b,
|
||||||
drawLine(point3, point7, color);
|
drawLine(point3, point7, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugDrawer::render()
|
void DebugDrawer::render(bool clear)
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_DEBUGDRAW
|
#ifdef ENABLE_DEBUGDRAW
|
||||||
if(!isDrawing)
|
if(!isDrawing)
|
||||||
|
|
@ -335,7 +335,7 @@ void DebugDrawer::render()
|
||||||
shouldToggleFreeze = false;
|
shouldToggleFreeze = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(p->dieTime <= curTime && !isFrozen && p->dieTime != U32_MAX)
|
if(clear && p->dieTime <= curTime && !isFrozen && p->dieTime != U32_MAX)
|
||||||
{
|
{
|
||||||
*walk = p->next;
|
*walk = p->next;
|
||||||
mPrimChunker.free(p);
|
mPrimChunker.free(p);
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,9 @@ public:
|
||||||
static void init();
|
static void init();
|
||||||
|
|
||||||
/// Called globally to render debug draw state. Also does state updates.
|
/// 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 toggleFreeze() { shouldToggleFreeze = true; };
|
||||||
void toggleDrawing()
|
void toggleDrawing()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue