public override void WriteIndices(int[] indices) { var data = mBuffer.Lock(0, 0, 0); data.WriteRange(indices); mBuffer.Unlock(); maxIndex = indices.Max(); }
private void AddIndexDataNative(short[] indices, int numberOfIndices) { if (nativeIndexBuffer.Disposed) { CreateNativeIndexBuffer(); } var stream = nativeIndexBuffer.Lock(totalIndexOffsetInBytes, numberOfIndices * indexSize, LockFlags.None); stream.WriteRange(indices, 0, numberOfIndices); nativeIndexBuffer.Unlock(); }