minor vertex count calculation fixes in GeometryDebugRenderer

This commit is contained in:
Gered 2013-09-08 10:55:36 -04:00
parent 4ef2082971
commit ec9a4d6fad

View file

@ -156,7 +156,7 @@ namespace Blarg.GameFramework.Graphics
for (int j = _vertices.CurrentPosition; j < i; ++j) for (int j = _vertices.CurrentPosition; j < i; ++j)
_vertices.SetColor(j, ref color); _vertices.SetColor(j, ref color);
_vertices.Move(NumVerticesForBox); _vertices.MoveTo(i);
} }
public void Render(Point3 boxMin, Point3 boxMax) public void Render(Point3 boxMin, Point3 boxMax)
@ -199,7 +199,7 @@ namespace Blarg.GameFramework.Graphics
public void Render(ref BoundingSphere sphere, ref Color color) public void Render(ref BoundingSphere sphere, ref Color color)
{ {
const int NumVerticesForSphere = 615; const int NumVerticesForSphere = 616;
if (!_hasBegunRendering) if (!_hasBegunRendering)
throw new InvalidOperationException(); throw new InvalidOperationException();
@ -259,7 +259,7 @@ namespace Blarg.GameFramework.Graphics
for (int i = _vertices.CurrentPosition; i < p; ++i) for (int i = _vertices.CurrentPosition; i < p; ++i)
_vertices.SetColor(i, ref color); _vertices.SetColor(i, ref color);
_vertices.Move(NumVerticesForSphere); _vertices.MoveTo(p);
} }
public void Render(Ray ray, float length) public void Render(Ray ray, float length)