update wellspring

pull/20/head
cosmonaut 2022-06-30 13:25:52 -07:00
parent 1aa522ffa1
commit d190df55b2
2 changed files with 7 additions and 1 deletions

@ -1 +1 @@
Subproject commit a3bc386526fab12020c09153d2d3e23ff7177c62
Subproject commit ac63d6c9b2d773792f8c3e5dafe760dd8769a4bf

View File

@ -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?
}
}
}