Function meshopt::optimize::optimize_vertex_fetch[][src]

pub fn optimize_vertex_fetch<T: Clone + Default>(
    indices: &mut [u32],
    vertices: &[T]
) -> Vec<T>

Reorders vertices and changes indices to reduce the amount of GPU memory fetches during vertex processing.

This functions works for a single vertex stream; for multiple vertex streams, use optimize_vertex_fetch_remap + remap_vertex_buffer for each stream.

indices is used both as an input and as an output index buffer.