Share via


MTKTextureLoader.FromData Method

Definition

Overloads

Name Description
FromData(NSData, MTKTextureLoaderOptions, MTKTextureLoaderCallback)

Creates and returns a Metal texture from the specified image data and options, and runs a completion handler when it completes.

FromData(NSData, MTKTextureLoaderOptions, NSError)

Creates and returns a Metal texture from the specified image data and options.

FromData(NSData, MTKTextureLoaderOptions, MTKTextureLoaderCallback)

Creates and returns a Metal texture from the specified image data and options, and runs a completion handler when it completes.

[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public void FromData(Foundation.NSData data, MetalKit.MTKTextureLoaderOptions? options, MetalKit.MTKTextureLoaderCallback completionHandler);
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
member this.FromData : Foundation.NSData * MetalKit.MTKTextureLoaderOptions * MetalKit.MTKTextureLoaderCallback -> unit

Parameters

data
NSData

The texture data.

options
MTKTextureLoaderOptions

Options for loading the texture data.

completionHandler
MTKTextureLoaderCallback

A handler to run after the texture is loaded.

Attributes

Applies to

FromData(NSData, MTKTextureLoaderOptions, NSError)

Creates and returns a Metal texture from the specified image data and options.

[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public Metal.IMTLTexture? FromData(Foundation.NSData data, MetalKit.MTKTextureLoaderOptions? options, out Foundation.NSError error);
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
member this.FromData : Foundation.NSData * MetalKit.MTKTextureLoaderOptions * NSError -> Metal.IMTLTexture

Parameters

data
NSData

The texture data.

options
MTKTextureLoaderOptions

Options for loading the texture data.

error
NSError

Contains the error, if one occurred.

Returns

Attributes

Applies to