Contents

MDLMeshBufferData

A memory buffer that stores vertex or index data for a Model I/O mesh.

Declaration

class MDLMeshBufferData

Overview

This class is the simplest concrete implementation of the MDLMeshBuffer protocol—use this class when you need only a single data store for loading or processing mesh data. To share mesh data for other uses, use another concrete implementation of the MDLMeshBuffer protocol—for example, the MTKMeshBuffer class shares mesh data with Metal buffers, ensuring that data is copied a minimal number of times between loading, processing, and rendering.If you do not specify a MDLMeshBufferAllocator object for loading meshes from a file with the MDLAsset class or generating meshes with the MDLMesh class, Model I/O uses MDLMeshBufferData objects to store mesh data.

Topics

Creating a Buffer

Accessing a Buffer’s Data

See Also

Managing Mesh Data