Merge pull request #5553 from natural-law/develop

Solve the bug: debug frames are not shown in ChipmunkTest.
This commit is contained in:
James Chen 2014-03-05 15:37:20 +08:00
commit b1a8334ec7
1 changed files with 3 additions and 1 deletions

View File

@ -189,11 +189,13 @@ void PhysicsDebugNode::draw(Renderer *renderer, const kmMat4 &transform, bool tr
return;
}
#if CC_ENABLE_CHIPMUNK_INTEGRATION
// clear the shapes information before draw current shapes.
DrawNode::clear();
cpSpaceEachShape(_spacePtr, (cpSpaceShapeIteratorFunc)DrawShape, this);
cpSpaceEachConstraint(_spacePtr, (cpSpaceConstraintIteratorFunc)DrawConstraint, this);
DrawNode::draw(renderer, transform, transformUpdated);
DrawNode::clear();
#endif
}