Skip to content
LRH539 edited this page Dec 28, 2017 · 2 revisions

MetalKitPlus

A framework to ease developing applications with Metal.

This wiki describes the workflow a developer using MetalKitPlus should adhere to. MetalKitPlus has been designed following best-practices from the official Metal programming guide.

This framework builds upon Metal and MetalKit, but adds to it by helping the developer to organize assets and shaders as well as providing default implementations for many aspects of Metal. Thus the developer can focus on developing shaders without the hassle of implementing all the boilerplate code around them.

In order to achieve this, you should first get familiar with the key concepts used in MetalKitPlus:

  1. MTKPPipelineStateDescriptor - Bundles all data required to encode a command (textures, threadgroup size etc.)
  2. MTKPAssets - Compiles and stores MTLFunctions in a MTLLibrary along with the corresponding MTKPPipelineStateDescriptors, so that all relevant information can be accessed from a single data structure
  3. MTKPIOProvider - Every shader requires the definition of the functions fetchBuffers() and fetchTextures(), which are being used to load textures from disk etc.
  4. MTKPComputer - Glues everything together by providing a unified method to encode (execute) shaders by providing an encode() function, which only takes the name of the desired shader as an argument.
Clone this wiki locally