Edit

Share via


MTLDevice_Extensions.CreateBufferNoCopy<T> Method

Definition

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.

Returns

Applies to