private void CreateInfexBuffer()
{
int numIndices = MAXCHARS * CHARINDICES;
ushort[] indices = new ushort[numIndices];
for (int j = 0, v = 0; j < indices.Length; j += CHARINDICES, v += CHARVERTICES)
{
indices[j + 0] = (ushort)v; // 0
indices[j + 1] = (ushort)(v + 2); // 2
indices[j + 2] = (ushort)(v + 1); // 1
indices[j + 3] = (ushort)(v + 1); // 1
indices[j + 4] = (ushort)(v + 2); // 2
indices[j + 5] = (ushort)(v + 3); // 3
}
this.indexBuffer = new IndexBuffer(indices);
this.RenderManager.GraphicsDevice.BindIndexBuffer(this.indexBuffer);
}