Instance Method

newTextures(URLs:options:completionHandler:)

Asynchronously loads image data and creates new Metal textures from the specified list of URLs.

Declaration

func newTextures(URLs: [URL], options: [MTKTextureLoader.Option : Any]? = nil, completionHandler: @escaping MTKTextureLoader.ArrayCallback)

Parameters

URLs

An array of URLs referencing files to load.

options

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

completionHandler

A block called after all URLs have been processed. See the MTKTextureLoader.ArrayCallback signature to determine whether each texture has successfully loaded.

See Also

Loading Textures from URLs

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

Synchronously loads image data and creates a new Metal texture from a given URL.

func newTexture(URL: URL, options: [MTKTextureLoader.Option : Any]?, completionHandler: MTKTextureLoader.Callback)

Asynchronously loads image data and creates a new Metal texture from a given URL.

func newTextures(URLs: [URL], options: [MTKTextureLoader.Option : Any]?, error: NSErrorPointer) -> [MTLTexture]

Synchronously loads image data and creates new Metal textures from the specified list of URLs.