Skip to main content
API Reference SwiftyNsdk TextureUtils

createOrUpdateTexture

Creates or updates a Metal texture using a RawImage....

Declaration

@discardableResult static func createOrUpdateTexture(from image: RawImage?, texture: inout MTLTexture?, device: MTLDevice) -> Bool

Summary

Creates or updates a Metal texture using a RawImage.
- Parameters:
- image: The image buffer on cpu memory.
- texture: An existing Metal texture to update, or nil to create a new one.
- device: The Metal device used to allocate textures.
- Returns: true if the texture was allocated or updated this call.


ON THIS PAGE