MTLDevice_Extensions.CreateBufferNoCopy<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates and returns a new buffer that is wrapped around the specified data, and runs an optional deallocator
when the memory is deallocated.
public static Metal.IMTLBuffer CreateBufferNoCopy<T> (this Metal.IMTLDevice This, T[] data, Metal.MTLResourceOptions options, Metal.MTLDeallocator deallocator) where T : struct;
static member CreateBufferNoCopy : Metal.IMTLDevice * 'T[] * Metal.MTLResourceOptions * Metal.MTLDeallocator -> Metal.IMTLBuffer (requires 'T : struct)
Type Parameters
- T
The type for which to create a buffer.
Parameters
- This
- IMTLDevice
The instance on which this method operates.
- data
- T[]
The data to wrap.
- options
- MTLResourceOptions
Options for creating the buffer.
- deallocator
- MTLDeallocator
The deallocator to use when deleting the buffer.