pub fn optimize_vertex_fetch_remap(
    destination: &mut [u32],
    indices: &[u32]
) -> usize
Expand description

Generates vertex remap to reduce the amount of GPU memory fetches during vertex processing.

Returns the number of unique vertices, which is the same as input vertex count unless some vertices are unused. The resulting remap table should be used to reorder vertex/index buffers using remap_vertex_buffer/remap_index_buffer.

Arguments

  • destination: must contain the exact space for the resulting remap table (vertex_count elements)