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);
|
IndexBuffer = new Buffer(GraphicsDevice, BufferUsageFlags.Index, indexDataLengthInBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
commandBuffer.SetBufferData(VertexBuffer, vertexDataPointer, 0, vertexDataLengthInBytes);
|
if (vertexDataLengthInBytes > 0 && indexDataLengthInBytes > 0)
|
||||||
commandBuffer.SetBufferData(IndexBuffer, indexDataPointer, 0, indexDataLengthInBytes);
|
{
|
||||||
|
commandBuffer.SetBufferData(VertexBuffer, vertexDataPointer, 0, vertexDataLengthInBytes);
|
||||||
|
commandBuffer.SetBufferData(IndexBuffer, indexDataPointer, 0, indexDataLengthInBytes);
|
||||||
|
}
|
||||||
|
|
||||||
PrimitiveCount = vertexCount / 2; // FIXME: is this jank?
|
PrimitiveCount = vertexCount / 2; // FIXME: is this jank?
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue