public void Draw(TextureContext texture, VertexPositionColorTexture[] vertices, int offset, int count)
{
CheckValid(texture);
if (count % 4 != 0)
throw new ArgumentException("Vertices must be provided in multiples of 4");
CheckState(texture);
while (count > 0) {
if (_vertices.Length - _vBufferIndex < count)
Flush();
int copyCount = Math.Min(vertices.Length, count);
Array.Copy(vertices, offset, _vertices, _vBufferIndex, copyCount);
_vBufferIndex += copyCount;
count -= copyCount;
if (count == 0)
break;
}
}