protected IIndexBuffer(IDisposableResource parent, BufferUsages usage, int[] indices) : base(parent) { this.usage = usage; indexByteSize = sizeof(short); indexCount = indices.Length; _32BitIndices = indexCount > short.MaxValue; indexByteSize = _32BitIndices ? sizeof(int) : sizeof(short); }