diff --git a/Blarg.GameFramework/Graphics/IndexBuffer.cs b/Blarg.GameFramework/Graphics/IndexBuffer.cs index 0b14e6a..ea2b9af 100644 --- a/Blarg.GameFramework/Graphics/IndexBuffer.cs +++ b/Blarg.GameFramework/Graphics/IndexBuffer.cs @@ -152,8 +152,13 @@ namespace Blarg.GameFramework.Graphics if (!IsClientSide) SizeBufferObject(); - if (CurrentPosition >= NumElements) - CurrentPosition = NumElements - 1; + if (numIndices == 0) + CurrentPosition = 0; + else + { + if (CurrentPosition >= NumElements) + CurrentPosition = NumElements - 1; + } } public void Extend(int amount)