Share via


MTKTextureLoader.FromCGImageAsync(CGImage, MTKTextureLoaderOptions) Method

Definition

Asynchronously creates a Metal texture from the specified Core Graphics image and options, and returns a task that provides the resulting image.

[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public System.Threading.Tasks.Task<Metal.IMTLTexture> FromCGImageAsync(CoreGraphics.CGImage cgImage, MetalKit.MTKTextureLoaderOptions? options);
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
member this.FromCGImageAsync : CoreGraphics.CGImage * MetalKit.MTKTextureLoaderOptions -> System.Threading.Tasks.Task<Metal.IMTLTexture>

Parameters

cgImage
CGImage

A Core Graphics image.

options
MTKTextureLoaderOptions

Options for loading the texture data.

Returns

Attributes

Applies to