Function meshopt::encoding::encode_index_buffer [−][src]
pub fn encode_index_buffer(
indices: &[u32],
vertex_count: usize
) -> Result<Vec<u8>>
Encodes index data into an array of bytes that is generally much smaller (<1.5 bytes/triangle) and compresses better (<1 bytes/triangle) compared to original.
For maximum efficiency the index buffer being encoded has to be optimized for vertex cache and vertex fetch first.