fix TextBatch index buffers being created as vertex buffers

main
cosmonaut 2024-01-27 17:34:26 -08:00
parent 42e3ac91af
commit d986b3013f
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ namespace MoonWorks.Graphics.Font
if (IndexBuffer.Size < indexDataLengthInBytes) if (IndexBuffer.Size < indexDataLengthInBytes)
{ {
IndexBuffer.Dispose(); IndexBuffer.Dispose();
IndexBuffer = new Buffer(GraphicsDevice, BufferUsageFlags.Vertex, vertexDataLengthInBytes); IndexBuffer = new Buffer(GraphicsDevice, BufferUsageFlags.Index, vertexDataLengthInBytes);
} }
if (vertexDataLengthInBytes > 0 && indexDataLengthInBytes > 0) if (vertexDataLengthInBytes > 0 && indexDataLengthInBytes > 0)