HaloMap.RawData.ParsedModel.DisplayedInfo.CreateIndexBuffers C# (CSharp) Method

CreateIndexBuffers() private static method

The create index buffers.
private static CreateIndexBuffers ( Device &device, ParsedModel &pm ) : void
device Device The device.
pm ParsedModel The pm.
return void
            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();
                }
            }