Contents

MDLMeshBufferAllocator

The general interface for managing allocation of data buffers to be used in loading, processing, and rendering meshes.

Declaration

protocol MDLMeshBufferAllocator : NSObjectProtocol

Overview

Classes adopting this protocol provide different ways of handling mesh buffer data. For example, the MTKMeshBufferAllocator 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.

Topics

Allocating Mesh Buffers

See Also

Managing Mesh Data