diff --git a/lib/WellspringCS b/lib/WellspringCS index a3bc3865..ac63d6c9 160000 --- a/lib/WellspringCS +++ b/lib/WellspringCS @@ -1 +1 @@ -Subproject commit a3bc386526fab12020c09153d2d3e23ff7177c62 +Subproject commit ac63d6c9b2d773792f8c3e5dafe760dd8769a4bf diff --git a/src/Graphics/Font/TextBatch.cs b/src/Graphics/Font/TextBatch.cs index 9b6d0731..375a9630 100644 --- a/src/Graphics/Font/TextBatch.cs +++ b/src/Graphics/Font/TextBatch.cs @@ -13,10 +13,13 @@ namespace MoonWorks.Graphics.Font public Texture Texture { get; protected set; } public uint PrimitiveCount { get; protected set; } + private byte[] StringBytes; + public TextBatch(GraphicsDevice graphicsDevice) { GraphicsDevice = graphicsDevice; Handle = Wellspring.Wellspring_CreateTextBatch(); + StringBytes = new byte[128]; } public void Start(Packer packer) @@ -71,6 +74,7 @@ namespace MoonWorks.Graphics.Font { Wellspring.Wellspring_GetBufferData( Handle, + out uint vertexCount, out IntPtr vertexDataPointer, out uint vertexDataLengthInBytes, out IntPtr indexDataPointer, @@ -99,6 +103,8 @@ namespace MoonWorks.Graphics.Font commandBuffer.SetBufferData(VertexBuffer, vertexDataPointer, 0, vertexDataLengthInBytes); commandBuffer.SetBufferData(IndexBuffer, indexDataPointer, 0, indexDataLengthInBytes); + + PrimitiveCount = vertexCount / 2; // FIXME: is this jank? } } }