A buffer identifying the faces in the submesh and the number of vertices in each.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- Model I/O
This buffer contains 8-bit unsigned integer values, where each entry corresponds to the number of vertices making up a face. For example, a submesh containing two triangles, a quad, and a line would contain the data
3 3 4 2. If the submesh’s
geometry property identifies a fixed type (such as
MDLGeometry), this buffer is optional. In this case, Model I/O automatically creates the buffer upon the first attempt to read this property.
index property stores indices in the order described by the topology buffer. In the example above, the index buffer would contain three indices for the first triangle, followed by three for the second, followed by four for the quad, and finally two indices for the line.