Instance Method

newTexture(texture:options:completionHandler:)

Asynchronously loads image data and creates a Metal texture from the specified Model I/O texture.

Declaration

func newTexture(texture: MDLTexture, options: [MTKTextureLoader.Option : Any]? = nil, completionHandler: @escaping MTKTextureLoader.Callback)

Parameters

texture

A Model I/O texture object containing image data from which to create the texture.

options

A dictionary describing any additional texture loading steps. See Texture Loading Options.

completionHandler

A block called when the texture has been loaded and fully initialized.

See Also

Loading Textures from Model I/O Representations

func newTexture(texture: MDLTexture, options: [MTKTextureLoader.Option : Any]?) -> MTLTexture

Synchronously loads image data and creates a Metal texture from the specified Model I/O texture.