Add glDrawElements

This commit is contained in:
Gustas
2023-08-24 14:38:53 +03:00
committed by Matthias Mailänder
parent f6c1453b5b
commit 9b8895df39
5 changed files with 34 additions and 0 deletions

View File

@@ -347,6 +347,15 @@ namespace OpenRA
PerfHistory.Increment("batches", 1);
}
public void DrawBatch<T>(IVertexBuffer<T> vertices, IIndexBuffer indices, int numIndices, int start)
where T : struct
{
vertices.Bind();
indices.Bind();
Context.DrawElements(numIndices, start);
PerfHistory.Increment("batches", 1);
}
public void Flush()
{
CurrentBatchRenderer = null;