Share via


IMTLDevice.CreateBufferNoCopy 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.

[Foundation.Export("newBufferWithBytesNoCopy:length:options:deallocator:")]
[Foundation.RequiredMember]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual Metal.IMTLBuffer? CreateBufferNoCopy(IntPtr pointer, UIntPtr length, Metal.MTLResourceOptions options, Metal.MTLDeallocator deallocator);
[<Foundation.Export("newBufferWithBytesNoCopy:length:options:deallocator:")>]
[<Foundation.RequiredMember>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member CreateBufferNoCopy : nativeint * unativeint * Metal.MTLResourceOptions * Metal.MTLDeallocator -> Metal.IMTLBuffer
override this.CreateBufferNoCopy : nativeint * unativeint * Metal.MTLResourceOptions * Metal.MTLDeallocator -> Metal.IMTLBuffer

Parameters

pointer
IntPtr

nativeint

The data to wrap.

length
UIntPtr

unativeint

The length of the data to wrap.

options
MTLResourceOptions

Options for creating the buffer.

deallocator
MTLDeallocator

The deallocator to use when deleting the buffer.

Returns

Attributes

Applies to