Edit

Share via


MTKTextureLoader.FromCGImage Method

Definition

Overloads

FromCGImage(CGImage, MTKTextureLoaderOptions, NSError)

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

FromCGImage(CGImage, MTKTextureLoaderOptions, MTKTextureLoaderCallback)

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

FromCGImage(CGImage, MTKTextureLoaderOptions, NSError)

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

public Metal.IMTLTexture FromCGImage (CoreGraphics.CGImage cgImage, MetalKit.MTKTextureLoaderOptions options, out Foundation.NSError error);
member this.FromCGImage : CoreGraphics.CGImage * MetalKit.MTKTextureLoaderOptions *  -> Metal.IMTLTexture

Parameters

cgImage
CGImage

A Core Graphics image.

options
MTKTextureLoaderOptions

Options for loading the texture data.

error
NSError

Contains the error, if one occurred.

Returns

Applies to

FromCGImage(CGImage, MTKTextureLoaderOptions, MTKTextureLoaderCallback)

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

public void FromCGImage (CoreGraphics.CGImage cgImage, MetalKit.MTKTextureLoaderOptions options, MetalKit.MTKTextureLoaderCallback completionHandler);
member this.FromCGImage : CoreGraphics.CGImage * MetalKit.MTKTextureLoaderOptions * MetalKit.MTKTextureLoaderCallback -> unit

Parameters

cgImage
CGImage

A Core Graphics image.

options
MTKTextureLoaderOptions

Options for loading the texture data.

completionHandler
MTKTextureLoaderCallback

A handler to run after the texture is loaded.

Applies to