private unsafe void CreateBufferWithData(ReadOnlySpan <T> data) { CreateBuffer(); Length = data.Length; device.BindBuffer(GlBufferType, BufferHandle); fixed(void *pdata = data) device.BufferData(GlBufferType, new IntPtr(data.Length * Utilities.SizeOf <T>()), new IntPtr(pdata), UsageHint); device.BindBuffer(GlBufferType, 0); }