private static void CreateIndexBuffers(ref Device device, ref ParsedModel pm)
{
// Pool pool=;
// if (device.DeviceCaps..
pm.Display.indexBuffer = new IndexBuffer[pm.RawDataMetaChunks.Length];
for (int rawindex = 0; rawindex < pm.Display.Chunk.Count; rawindex++)
{
int x = pm.Display.Chunk[rawindex];
pm.Display.indexBuffer[x] = new IndexBuffer(
typeof(short), pm.RawDataMetaChunks[x].IndiceCount, device, Usage.WriteOnly, Pool.Managed);
IndexBuffer ib = pm.Display.indexBuffer[x];
ib.SetData(pm.RawDataMetaChunks[x].Indices, 0, LockFlags.None);
ib.Unlock();
}
}