Physics2D: Fix DebugDraw of polygons

This commit is contained in:
Jérôme Leclercq 2017-10-16 11:57:23 +02:00
parent 6e7b78611d
commit b3f3d16f13
1 changed files with 3 additions and 3 deletions

View File

@ -44,11 +44,11 @@ namespace Nz
{
//TODO: constexpr if to prevent copy/cast if sizeof(cpVect) == sizeof(Vector2f)
StackArray<Vector2f> vertices = NazaraStackAllocation(Vector2f, vertexCount);
StackArray<Vector2f> nVertices = NazaraStackAllocation(Vector2f, vertexCount);
for (int i = 0; i < vertexCount; ++i)
vertices[i].Set(float(vertices[i].x), float(vertices[i].y));
nVertices[i].Set(float(vertices[i].x), float(vertices[i].y));
drawOptions->polygonCallback(vertices.data(), vertexCount, float(radius), CpDebugColorToColor(outlineColor), CpDebugColorToColor(fillColor), drawOptions->userdata);
drawOptions->polygonCallback(nVertices.data(), vertexCount, float(radius), CpDebugColorToColor(outlineColor), CpDebugColorToColor(fillColor), drawOptions->userdata);
}
};