Initialise VertexBuffers immediately

This commit is contained in:
Gustas
2025-02-22 16:04:23 +02:00
committed by Paul Chote
parent a2096b6768
commit 39aec39364
10 changed files with 63 additions and 18 deletions

View File

@@ -49,12 +49,18 @@ namespace OpenRA.Platforms.Default
OpenGL.CheckGLError();
}
public IVertexBuffer<T> CreateVertexBuffer<T>(int size) where T : struct
public IVertexBuffer<T> CreateEmptyVertexBuffer<T>(int size) where T : struct
{
VerifyThreadAffinity();
return new VertexBuffer<T>(size);
}
public IVertexBuffer<T> CreateVertexBuffer<T>(T[] data, bool dynamic = true) where T : struct
{
VerifyThreadAffinity();
return new VertexBuffer<T>(data, dynamic);
}
public IIndexBuffer CreateIndexBuffer(uint[] indices)
{
VerifyThreadAffinity();