Initializer

init(indexBuffer:indexCount:indexType:geometryType:material:)

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

Declaration

init(indexBuffer: MDLMeshBuffer, indexCount: Int, indexType: MDLIndexBitDepth, geometryType: MDLGeometryType, material: MDLMaterial?)

Parameters

indexBuffer

An object that provides index data for the submesh.

indexCount

The number of indices in the index buffer.

indexType

The data type of each index in the index buffer.

geometryType

The type of geometric primitives described by the index buffer.

material

A description of the intended surface appearance for rendering the submesh.

Return Value

A new submesh object.

Discussion

Typically, a submesh is imported from an asset file as a member of a MDLMesh object, but you can also use this method to create a submesh programmatically.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software