add ClearDraw

This commit is contained in:
2youyouo2 2017-03-09 17:10:27 +08:00
parent 582e202912
commit a03c09d797
2 changed files with 4 additions and 0 deletions

View File

@ -79,6 +79,8 @@ public:
/// @param xf a transform. /// @param xf a transform.
virtual void DrawTransform(const b2Transform& xf) = 0; virtual void DrawTransform(const b2Transform& xf) = 0;
/// Clear draw commands
virtual void ClearDraw() = 0;
protected: protected:
uint32 m_drawFlags; uint32 m_drawFlags;
}; };

View File

@ -1139,6 +1139,8 @@ void b2World::DrawDebugData()
return; return;
} }
g_debugDraw->ClearDraw();
uint32 flags = g_debugDraw->GetFlags(); uint32 flags = g_debugDraw->GetFlags();
if (flags & b2Draw::e_shapeBit) if (flags & b2Draw::e_shapeBit)