forked from MoonsideGames/MoonWorks
fix validation error when TextBatch is empty
parent
59190e619d
commit
bd98ae8441
|
@ -101,8 +101,11 @@ namespace MoonWorks.Graphics.Font
|
|||
IndexBuffer = new Buffer(GraphicsDevice, BufferUsageFlags.Index, indexDataLengthInBytes);
|
||||
}
|
||||
|
||||
if (vertexDataLengthInBytes > 0 && indexDataLengthInBytes > 0)
|
||||
{
|
||||
commandBuffer.SetBufferData(VertexBuffer, vertexDataPointer, 0, vertexDataLengthInBytes);
|
||||
commandBuffer.SetBufferData(IndexBuffer, indexDataPointer, 0, indexDataLengthInBytes);
|
||||
}
|
||||
|
||||
PrimitiveCount = vertexCount / 2; // FIXME: is this jank?
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue