SpriteRenderer, do not copy vertex array data each flush.

This commit is contained in:
Vapre
2021-07-17 00:03:12 +02:00
committed by abcdefg30
parent 243e2b2a2a
commit 7005da3592
6 changed files with 43 additions and 3 deletions

View File

@@ -333,6 +333,12 @@ namespace OpenRA
DrawBatch(tempBuffer, 0, numVertices, type);
}
public void DrawBatch(ref Vertex[] vertices, int numVertices, PrimitiveType type)
{
tempBuffer.SetData(ref vertices, numVertices);
DrawBatch(tempBuffer, 0, numVertices, type);
}
public void DrawBatch<T>(IVertexBuffer<T> vertices,
int firstVertex, int numVertices, PrimitiveType type)
where T : struct