From d986b3013f6af3d5f4e248d7325d2631c96419f0 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Sat, 27 Jan 2024 17:34:26 -0800 Subject: [PATCH] fix TextBatch index buffers being created as vertex buffers --- src/Graphics/Font/TextBatch.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Graphics/Font/TextBatch.cs b/src/Graphics/Font/TextBatch.cs index 7aef845..9cb909c 100644 --- a/src/Graphics/Font/TextBatch.cs +++ b/src/Graphics/Font/TextBatch.cs @@ -102,7 +102,7 @@ namespace MoonWorks.Graphics.Font if (IndexBuffer.Size < indexDataLengthInBytes) { IndexBuffer.Dispose(); - IndexBuffer = new Buffer(GraphicsDevice, BufferUsageFlags.Vertex, vertexDataLengthInBytes); + IndexBuffer = new Buffer(GraphicsDevice, BufferUsageFlags.Index, vertexDataLengthInBytes); } if (vertexDataLengthInBytes > 0 && indexDataLengthInBytes > 0)