<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalKit",
  "identifier" : "/documentation/MetalKit/MTKMesh",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "MetalKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MTKMesh"
  },
  "title" : "MTKMesh"
}
-->

# MTKMesh

A container for the vertex data of a Model I/O mesh, suitable for use in a Metal app.

```
class MTKMesh
```

## Topics

### Initialization

[`init(mesh:device:)`](/documentation/MetalKit/MTKMesh/init(mesh:device:))

Initializes a MetalKit mesh and its submeshes from a Model I/O mesh.

### Loading Meshes from an Asset

[`newMeshes(asset:device:)`](/documentation/MetalKit/MTKMesh/newMeshes(asset:device:))

[`newMeshesFromAsset:device:sourceMeshes:error:`](/documentation/MetalKit/MTKMesh/newMeshesFromAsset:device:sourceMeshes:error:)

Creates and initializes MetalKit meshes from all Model I/O meshes in a Model I/O asset.

### Submeshes

[`submeshes`](/documentation/MetalKit/MTKMesh/submeshes)

An array of submeshes containing index buffers referencing the mesh vertices.

### Vertex Properties

[`vertexBuffers`](/documentation/MetalKit/MTKMesh/vertexBuffers)

An array of buffers in which mesh vertex data resides.

[`vertexCount`](/documentation/MetalKit/MTKMesh/vertexCount)

The number of vertices in the vertex buffers.

[`vertexDescriptor`](/documentation/MetalKit/MTKMesh/vertexDescriptor)

A Model I/O vertex descriptor specifying the data layout in the vertex buffers.

### Identifying Properties

[`name`](/documentation/MetalKit/MTKMesh/name)

The name of the mesh.

### Constants

[Mesh Error Handling](/documentation/MetalKit/mesh-error-handling)

Strings used when handling <doc://com.apple.documentation/documentation/Foundation/NSError> messages returned from a mesh initialization method.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)