Class

MTKSubmesh

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

Declaration

@interface MTKSubmesh : NSObject

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

The parent mesh containing the vertex data of this submesh.

Properties used to Draw Indexed Primitives

indexBuffer

The index buffer used to render the submesh object.

indexCount

The number of indices in the index buffer.

indexType

The type of index data in the index buffer.

primitiveType

The primitive type with which to draw the submesh object.

Identifying Properties

name

The name of the submesh.

Relationships

Inherits From

See Also

Model Handling

MTKMesh

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

MTKMeshBuffer

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

MTKMeshBufferAllocator

An interface for allocating a MetalKit buffer that backs the vertex data of a Model I/O mesh, suitable for use in a Metal app.

Conversion Functions

Functions for converting between Metal and Model I/O vertex representations.

Model Errors

Errors that may be thrown by model handling methods.