newTexture(URL:options:completionHandler:)
Asynchronously loads image data and creates a new Metal texture from a given URL.
Declaration
func newTexture(URL: URL, options: [MTKTextureLoader.Option : Any]? = nil, completionHandler: @escaping @Sendable ((any MTLTexture)?, (any Error)?) -> Void)func newTexture(URL: URL, options: [MTKTextureLoader.Option : Any]? = nil) async throws -> any MTLTextureParameters
- URL:
The URL of the file to load.
- 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.