Share via


MTKTextureLoader.FromTexture Method

Definition

Overloads

FromTexture(MDLTexture, MTKTextureLoaderOptions, MTKTextureLoaderCallback)

Creates a new Metal texture from the specified texture.

[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public void FromTexture(ModelIO.MDLTexture texture, MetalKit.MTKTextureLoaderOptions? options, MetalKit.MTKTextureLoaderCallback completionHandler);
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
member this.FromTexture : ModelIO.MDLTexture * MetalKit.MTKTextureLoaderOptions * MetalKit.MTKTextureLoaderCallback -> unit

Parameters

texture
MDLTexture

The texture to load.

options
MTKTextureLoaderOptions

Options for loading the texture data.

completionHandler
MTKTextureLoaderCallback

A handler to run after the texture is loaded.

Attributes

Applies to

FromTexture(MDLTexture, MTKTextureLoaderOptions, NSError)

Creates a new Metal texture from the specified texture.

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

Parameters

texture
MDLTexture

The texture to load.

options
MTKTextureLoaderOptions

Options for loading the texture data.

error
NSError

Contains the error, if one occurred.

Returns

Attributes

Applies to

FromTexture(MDLTexture, NSDictionary, NSError)

[Foundation.Export("newTextureWithMDLTexture:options:error:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual Metal.IMTLTexture? FromTexture(ModelIO.MDLTexture texture, Foundation.NSDictionary? options, out Foundation.NSError error);
[<Foundation.Export("newTextureWithMDLTexture:options:error:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member FromTexture : ModelIO.MDLTexture * Foundation.NSDictionary * NSError -> Metal.IMTLTexture
override this.FromTexture : ModelIO.MDLTexture * Foundation.NSDictionary * NSError -> Metal.IMTLTexture

Parameters

texture
MDLTexture
options
NSDictionary
error
NSError

Returns

Attributes

Applies to

FromTexture(MDLTexture, NSDictionary, MTKTextureLoaderCallback)

[Foundation.Export("newTextureWithMDLTexture:options:completionHandler:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void FromTexture(ModelIO.MDLTexture texture, Foundation.NSDictionary? options, MetalKit.MTKTextureLoaderCallback completionHandler);
[<Foundation.Export("newTextureWithMDLTexture:options:completionHandler:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member FromTexture : ModelIO.MDLTexture * Foundation.NSDictionary * MetalKit.MTKTextureLoaderCallback -> unit
override this.FromTexture : ModelIO.MDLTexture * Foundation.NSDictionary * MetalKit.MTKTextureLoaderCallback -> unit

Parameters

texture
MDLTexture
options
NSDictionary
completionHandler
MTKTextureLoaderCallback
Attributes

Applies to