<!--
{
  "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" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLSubmesh",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLSubmesh"
  },
  "title" : "MDLSubmesh"
}
-->

# MDLSubmesh

A container for index buffer data and material information to be used in rendering all or part of a 3D object.

```
class MDLSubmesh
```

## Overview

Submeshes are contained in [`MDLMesh`](/documentation/ModelIO/MDLMesh) objects, which provide vertex buffer data that a submesh’s index data refers to. Together, the vertex and index data describe the geometric form of a portion of the mesh, and the submesh’s [`material`](/documentation/ModelIO/MDLSubmesh/material) property determines its intended surface appearance for rendering.

## Topics

### Creating a Submesh

[`init(indexBuffer:indexCount:indexType:geometryType:material:)`](/documentation/ModelIO/MDLSubmesh/init(indexBuffer:indexCount:indexType:geometryType:material:))

Initializes a submesh with an index buffer and the specified properties.

[`init(name:indexBuffer:indexCount:indexType:geometryType:material:)`](/documentation/ModelIO/MDLSubmesh/init(name:indexBuffer:indexCount:indexType:geometryType:material:))

Initializes a named submesh with an index buffer and the specified properties.

[`init(name:indexBuffer:indexCount:indexType:geometryType:material:topology:)`](/documentation/ModelIO/MDLSubmesh/init(name:indexBuffer:indexCount:indexType:geometryType:material:topology:))

Initializes a named submesh with a specific topology.

[`init(mdlSubmesh:indexType:geometryType:)`](/documentation/ModelIO/MDLSubmesh/init(mdlSubmesh:indexType:geometryType:)-4czyc)

Initializes a submesh by copying or converting another submesh.

### Working with a Submesh’s Index Buffer

[`indexBuffer`](/documentation/ModelIO/MDLSubmesh/indexBuffer)

An object that provides index data for the submesh.

[`indexCount`](/documentation/ModelIO/MDLSubmesh/indexCount)

The number of indices in the submesh’s index buffer.

[`indexType`](/documentation/ModelIO/MDLSubmesh/indexType)

The data type for each element in the submesh’s index buffer.

[`geometryType`](/documentation/ModelIO/MDLSubmesh/geometryType)

The type of geometric primitives described by the submesh’s index buffer.

[`topology`](/documentation/ModelIO/MDLSubmesh/topology)

A description of how the non-uniform layout of the submesh’s index buffer defines the shape of the mesh.

[`indexBuffer(asIndexType:)`](/documentation/ModelIO/MDLSubmesh/indexBuffer(asIndexType:))

### Associating Materials with a Submesh

[`material`](/documentation/ModelIO/MDLSubmesh/material)

An object that describes the intended surface appearance of the submesh for rendering.

### Identifying a Submesh

[`name`](/documentation/ModelIO/MDLSubmesh/name)

A descriptive name for the submesh.

### Constants

[`MDLIndexBitDepth`](/documentation/ModelIO/MDLIndexBitDepth)

Options for the size of integer data in a submesh’s index buffer, used by the [`indexType`](/documentation/ModelIO/MDLSubmesh/indexType) property.

[`MDLGeometryType`](/documentation/ModelIO/MDLGeometryType)

Types of geometric primitives for rendering a submesh, used by the [`geometryType`](/documentation/ModelIO/MDLSubmesh/geometryType) property.



---

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)