The general interface for managing allocation of data buffers to be used in loading, processing, and rendering meshes.
- iOS 9.0+
- macOS 10.11+
- tvOS 9.0+
- Model I/O
Classes adopting this protocol provide different ways of handling mesh buffer data. For example, the
MTKMesh class can share mesh data with Metal buffers for use in rendering.
When you load meshes from a file with the
MDLAsset class or generate meshes with the
MDLMesh class, you must specify an allocator. By choosing an allocator specific to how you use a mesh, you can ensure that vertex and index data for the mesh is copied and transformed a minimal number of times between loading and use.