Skip to main content

compress_indices

Function compress_indices 

Source
pub fn compress_indices(
    indices: &[u32],
) -> Result<impl Iterator<Item = u16> + '_, CompressError>
Expand description

Narrow u32 indices to u16.

Which indices can be narrowed is index_fits_u16’s rule. Unlike the vertex-attribute compressors this returns a Result, because the input can genuinely be too large for the output format; the check runs over the whole input before any value is produced.