---
title: MTKSubmesh
framework: metalkit
role: symbol
role_heading: Class
path: metalkit/mtksubmesh
---

# MTKSubmesh

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

## Declaration

```swift
class MTKSubmesh
```

## Overview

Overview The MTKSubmesh class provides a container for a segment of mesh data that can be rendered in a single draw call. A submesh can only be initialized as part of a MTKMesh object. Each submesh contains an index buffer with which the parent’s mesh data can be rendered. Actual submesh vertex data resides in the submesh’s parent mesh. For more information on Model I/O submeshes, see MDLSubmesh.

## Topics

### Parent Mesh

- [mesh](metalkit/mtksubmesh/mesh.md)

### Properties used to Draw Indexed Primitives

- [indexBuffer](metalkit/mtksubmesh/indexbuffer.md)
- [indexCount](metalkit/mtksubmesh/indexcount.md)
- [indexType](metalkit/mtksubmesh/indextype.md)
- [primitiveType](metalkit/mtksubmesh/primitivetype.md)

### Identifying Properties

- [name](metalkit/mtksubmesh/name.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)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Model Handling

- [MTKMesh](metalkit/mtkmesh.md)
- [MTKMeshBuffer](metalkit/mtkmeshbuffer.md)
- [MTKMeshBufferAllocator](metalkit/mtkmeshbufferallocator.md)
- [Conversion Functions](metalkit/conversion-functions.md)
- [Model Errors](metalkit/model-errors.md)
