update IndexBuffer to also allow zero-size

This commit is contained in:
Gered 2013-08-27 21:34:28 -04:00
parent 85f57cd733
commit 5a37b8bdfe

View file

@ -152,9 +152,14 @@ namespace Blarg.GameFramework.Graphics
if (!IsClientSide)
SizeBufferObject();
if (numIndices == 0)
CurrentPosition = 0;
else
{
if (CurrentPosition >= NumElements)
CurrentPosition = NumElements - 1;
}
}
public void Extend(int amount)
{