TechnologiesGraphics, Imaging & Compositing

MetalKit

iOSmacOStvOSwatchOSvisionOS

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.

  • Pr
    MTKViewDelegatemacOS 10.11+
    @class MTKViewDelegate

Loading Textures 1

Create GPU textures from image data and asset sources.

  • Cl
    MTKTextureLoadermacOS 10.11+
    @class MTKTextureLoader

Model I/O Meshes 4

Bring Model I/O assets onto the GPU as renderable meshes and submeshes.

  • Cl
    MTKMeshmacOS 10.11+
    @class MTKMesh
  • Cl
    MTKSubmeshmacOS 10.11+
    @class MTKSubmesh
  • Cl
    MTKMeshBuffermacOS 10.11+
    @class MTKMeshBuffer
  • Cl
    MTKMeshBufferAllocatormacOS 10.11+
    @class MTKMeshBufferAllocator

Errors 1

Errors reported while handling Model I/O assets.

  • St
    MTKModelError
    @group MTKModelErrors

Classes 1

  • Cl
    MTKViewmacOS 10.11+
    @class MTKView
← Graphics, Imaging & Compositing