forked from MoonsideGames/MoonWorks
update wellspring
parent
1aa522ffa1
commit
d190df55b2
|
@ -1 +1 @@
|
||||||
Subproject commit a3bc386526fab12020c09153d2d3e23ff7177c62
|
Subproject commit ac63d6c9b2d773792f8c3e5dafe760dd8769a4bf
|
|
@ -13,10 +13,13 @@ namespace MoonWorks.Graphics.Font
|
||||||
public Texture Texture { get; protected set; }
|
public Texture Texture { get; protected set; }
|
||||||
public uint PrimitiveCount { get; protected set; }
|
public uint PrimitiveCount { get; protected set; }
|
||||||
|
|
||||||
|
private byte[] StringBytes;
|
||||||
|
|
||||||
public TextBatch(GraphicsDevice graphicsDevice)
|
public TextBatch(GraphicsDevice graphicsDevice)
|
||||||
{
|
{
|
||||||
GraphicsDevice = graphicsDevice;
|
GraphicsDevice = graphicsDevice;
|
||||||
Handle = Wellspring.Wellspring_CreateTextBatch();
|
Handle = Wellspring.Wellspring_CreateTextBatch();
|
||||||
|
StringBytes = new byte[128];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Start(Packer packer)
|
public void Start(Packer packer)
|
||||||
|
@ -71,6 +74,7 @@ namespace MoonWorks.Graphics.Font
|
||||||
{
|
{
|
||||||
Wellspring.Wellspring_GetBufferData(
|
Wellspring.Wellspring_GetBufferData(
|
||||||
Handle,
|
Handle,
|
||||||
|
out uint vertexCount,
|
||||||
out IntPtr vertexDataPointer,
|
out IntPtr vertexDataPointer,
|
||||||
out uint vertexDataLengthInBytes,
|
out uint vertexDataLengthInBytes,
|
||||||
out IntPtr indexDataPointer,
|
out IntPtr indexDataPointer,
|
||||||
|
@ -99,6 +103,8 @@ namespace MoonWorks.Graphics.Font
|
||||||
|
|
||||||
commandBuffer.SetBufferData(VertexBuffer, vertexDataPointer, 0, vertexDataLengthInBytes);
|
commandBuffer.SetBufferData(VertexBuffer, vertexDataPointer, 0, vertexDataLengthInBytes);
|
||||||
commandBuffer.SetBufferData(IndexBuffer, indexDataPointer, 0, indexDataLengthInBytes);
|
commandBuffer.SetBufferData(IndexBuffer, indexDataPointer, 0, indexDataLengthInBytes);
|
||||||
|
|
||||||
|
PrimitiveCount = vertexCount / 2; // FIXME: is this jank?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue