Esempio n. 1
0
 internal NativeBuffer(IDevice device, BufferTypeEnum bufferType, ReadOnlySpan <T> data, BufferInternalFormat internalFormat)
 {
     this.device         = device;
     this.internalFormat = internalFormat;
     this.BufferType     = bufferType;
     GlBufferType        = BufferTypeToBindFlags(bufferType);
     CreateBufferWithData(data);
 }
Esempio n. 2
0
 internal NativeBuffer(IDevice device, BufferTypeEnum bufferType, int length, BufferInternalFormat internalFormat)
 {
     this.device         = device;
     this.internalFormat = internalFormat;
     this.BufferType     = bufferType;
     GlBufferType        = BufferTypeToBindFlags(bufferType);
     CreateBuffer();
 }
Esempio n. 3
0
 // Safe multithread call
 public NativeBuffer <T> CreateBuffer <T>(BufferTypeEnum bufferType, int size, BufferInternalFormat format = BufferInternalFormat.None) where T : unmanaged
 {
     return(new NativeBuffer <T>(device, bufferType, size, format));
 }
Esempio n. 4
0
 public NativeBuffer <T> CreateBuffer <T>(BufferTypeEnum bufferType, ReadOnlySpan <T> data, BufferInternalFormat format = BufferInternalFormat.None) where T : unmanaged
 {
     return(new NativeBuffer <T>(device, bufferType, data, format));
 }
Esempio n. 5
0
 public NativeBuffer <T> CreateBuffer <T>(BufferTypeEnum bufferType, ReadOnlySpan <T> data, BufferInternalFormat format = BufferInternalFormat.None) where T : unmanaged => Device.CreateBuffer <T>(bufferType, data, format);