51 public void SetData<T>(T[] source,
int sourceStartIndex,
int sourceCount,
int targetStartIndex = 0) where T : unmanaged {
52 VerifyParametersSetData(source, sourceStartIndex, sourceCount, targetStartIndex);
53 GCHandle gCHandle = GCHandle.Alloc(source, GCHandleType.Pinned);
58 DataBox dataBox =
new(gCHandle.AddrOfPinnedObject() + sourceStartIndex * num, 1, 0);
59 ResourceRegion resourceRegion =
new(
72 BufferTargetARB.ArrayBuffer,
73 new IntPtr(targetStartIndex * vertexStride),
74 new UIntPtr((uint)(num * sourceCount)),
75 (gCHandle.AddrOfPinnedObject() + sourceStartIndex * num).ToPointer()
95 m_buffer =
new SharpDX.Direct3D11.Buffer(
98 ResourceUsage.Default,
99 BindFlags.VertexBuffer,
101 ResourceOptionFlags.None,
110 BufferTargetARB.ArrayBuffer,
113 BufferUsageARB.StaticDraw