Mesh:setVertexMap

Sets the vertex map. The vertex map is a list of indices in the Mesh, allowing the reordering or reuse of vertices.

Often, a vertex map is used to improve performance, since it usually requires less data to specify the index of a vertex than it does to specify all of the data for a vertex.

Mesh:setVertexMap(map)

Arguments

NameTypeDescription
maptableThe new vertex map. Each element of the table is an index of a vertex.

Returns

Nothing


This variant is much faster than the previous one, but is harder to use.

Mesh:setVertexMap(blob, size)

Arguments

NameTypeDefaultDescription
blobBlobA Blob to use to update vertex data.
sizenumber4The size of each element of the Blob, in bytes. Must be 2 or 4.

Returns

Nothing

See also