Mesh:setIndices

Edit

Sets or clears the vertex indices of the Mesh. Vertex indices define the list of triangles in the mesh. They allow vertices to be reused multiple times without duplicating all their data, which can save a lot of memory and processing time if a vertex is used for multiple triangles.

If a Mesh doesn't have vertex indices, then the vertices are rendered in order.




Set vertex indices using a table.

Arguments

NameTypeDescription
ttable A list of numbers (1-based).

Returns

Nothing

Set vertex indices using a Blob.

Arguments

NameTypeDescription
blobBlob The Blob with index data.
typeDataType The type of index data in the Blob. Must be u16 or u32.

Returns

Nothing

Disable vertex indices.

Arguments

None

Returns

Nothing

See also