newTexture(data:options:completionHandler:)
Asynchronously creates a new Metal texture from an in-memory representation of the texture’s data.
Declaration
func newTexture(data: Data, options: [MTKTextureLoader.Option : Any]? = nil, completionHandler: @escaping @Sendable ((any MTLTexture)?, (any Error)?) -> Void)func newTexture(data: Data, options: [MTKTextureLoader.Option : Any]? = nil) async throws -> any MTLTextureParameters
- data:
The Nsdata object containing image data.
- 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.