MetalKit provides utilities that streamline common tasks in Metal-based GPU rendering on iOS, macOS, tvOS, and visionOS. You load image data into GPU textures with MTKTextureLoader, drive a drawable Metal view by implementing MTKViewDelegate, and bring Model I/O assets onto the GPU through types such as MTKMesh, MTKSubmesh, and MTKMeshBuffer, allocated by MTKMeshBufferAllocator. Errors encountered while handling models are reported as MTKModelError.
Drawing in a Metal View 1
Drive the rendering loop and respond to size changes in a drawable Metal view.
- PrMTKViewDelegatemacOS 10.11+@class MTKViewDelegate
Loading Textures 1
Create GPU textures from image data and asset sources.
- ClMTKTextureLoadermacOS 10.11+@class MTKTextureLoader
Model I/O Meshes 4
Bring Model I/O assets onto the GPU as renderable meshes and submeshes.
- ClMTKMeshmacOS 10.11+@class MTKMesh
- ClMTKSubmeshmacOS 10.11+@class MTKSubmesh
- ClMTKMeshBuffermacOS 10.11+@class MTKMeshBuffer
- ClMTKMeshBufferAllocatormacOS 10.11+@class MTKMeshBufferAllocator
Errors 1
Errors reported while handling Model I/O assets.
- StMTKModelError@group MTKModelErrors
Classes 1
- ClMTKViewmacOS 10.11+@class MTKView