Remove Vertex from PlatformInterfaces

This commit is contained in:
Gustas
2023-09-13 10:44:08 +03:00
committed by Matthias Mailänder
parent d77fd5c13e
commit 0a90c2a95e
7 changed files with 67 additions and 41 deletions

View File

@@ -10,7 +10,6 @@
#endregion
using System;
using OpenRA.Graphics;
using OpenRA.Primitives;
using SDL2;
@@ -62,10 +61,10 @@ namespace OpenRA.Platforms.Default
OpenGL.CheckGLError();
}
public IVertexBuffer<Vertex> CreateVertexBuffer(int size)
public IVertexBuffer<T> CreateVertexBuffer<T>(int size) where T : struct
{
VerifyThreadAffinity();
return new VertexBuffer<Vertex>(size);
return new VertexBuffer<T>(size);
}
public IIndexBuffer CreateIndexBuffer(uint[] indices)
@@ -74,10 +73,10 @@ namespace OpenRA.Platforms.Default
return new StaticIndexBuffer(indices);
}
public Vertex[] CreateVertices(int size)
public T[] CreateVertices<T>(int size) where T : struct
{
VerifyThreadAffinity();
return new Vertex[size];
return new T[size];
}
public ITexture CreateTexture()