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 @Sendable ([any MTLTexture], (any Error)?) -> Void)func newTextures(URLs: [URL], options: [MTKTextureLoader.Option : Any]? = nil) async throws -> [any MTLTexture]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 Arraycallback signature to determine whether each texture has successfully loaded.