An object that decodes common image formats into Metal textures for use in your app.
- iOS 9.0+
- macOS 10.11+
- tvOS 9.0+
MTKTexture class simplifies the effort required to load your texture data into a Metal app. This class can load images from common file formats such as PNG, JPEG, and TIFF. Images can also be loaded from KTX and PVR files, along with additional loading options. Images are always loaded as
MTLTexture types and their pixel format is intrinsically inferred from their data.
Texture data can be loaded synchronously or asynchronously.
MTKTexture methods return an object conforming to the
MTLTexture protocol, but the class does not manage this object for you.