pub unsafe extern "C" fn meshopt_encodeIndexBuffer(
    buffer: *mut c_uchar,
    buffer_size: usize,
    indices: *const c_uint,
    index_count: usize
) -> usize
Expand description

Index buffer encoder 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. Input index buffer must represent a triangle list. Returns encoded data size on success, 0 on error; the only error condition is if buffer doesn’t have enough space For maximum efficiency the index buffer being encoded has to be optimized for vertex cache and vertex fetch first.

buffer must contain enough space for the encoded index buffer (use meshopt_encodeIndexBufferBound to compute worst case size)