---
title: MDLSubmesh
framework: modelio
role: symbol
role_heading: Class
path: modelio/mdlsubmesh
---

# MDLSubmesh

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

## Declaration

```swift
class MDLSubmesh
```

## Overview

Overview Submeshes are contained in 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 property determines its intended surface appearance for rendering.

## Topics

### Creating a Submesh

- [init(indexBuffer:indexCount:indexType:geometryType:material:)](modelio/mdlsubmesh/init(indexbuffer:indexcount:indextype:geometrytype:material:).md)
- [init(name:indexBuffer:indexCount:indexType:geometryType:material:)](modelio/mdlsubmesh/init(name:indexbuffer:indexcount:indextype:geometrytype:material:).md)
- [init(name:indexBuffer:indexCount:indexType:geometryType:material:topology:)](modelio/mdlsubmesh/init(name:indexbuffer:indexcount:indextype:geometrytype:material:topology:).md)
- [init(mdlSubmesh:indexType:geometryType:)](modelio/mdlsubmesh/init(mdlsubmesh:indextype:geometrytype:)-4czyc.md)

### Working with a Submesh’s Index Buffer

- [indexBuffer](modelio/mdlsubmesh/indexbuffer.md)
- [indexCount](modelio/mdlsubmesh/indexcount.md)
- [indexType](modelio/mdlsubmesh/indextype.md)
- [geometryType](modelio/mdlsubmesh/geometrytype.md)
- [topology](modelio/mdlsubmesh/topology.md)
- [indexBuffer(asIndexType:)](modelio/mdlsubmesh/indexbuffer(asindextype:).md)

### Associating Materials with a Submesh

- [material](modelio/mdlsubmesh/material.md)

### Identifying a Submesh

- [name](modelio/mdlsubmesh/name.md)

### Constants

- [MDLIndexBitDepth](modelio/mdlindexbitdepth.md)
- [MDLGeometryType](modelio/mdlgeometrytype.md)

### Initializers

- [init(MDLSubmesh:indexType:geometryType:)](modelio/mdlsubmesh/init(mdlsubmesh:indextype:geometrytype:)-6b9cm.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [MDLNamed](modelio/mdlnamed.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### 3D Asset Basics

- [MDLAsset](modelio/mdlasset.md)
- [MDLObject](modelio/mdlobject.md)
- [MDLTransform](modelio/mdltransform.md)
- [MDLMesh](modelio/mdlmesh.md)
- [MDLSubmeshTopology](modelio/mdlsubmeshtopology.md)
- [MDLNamed](modelio/mdlnamed.md)
