[][src]Function meshopt::ffi::meshopt_encodeVertexBuffer

pub unsafe extern "C" fn meshopt_encodeVertexBuffer(
    buffer: *mut c_uchar,
    buffer_size: usize,
    vertices: *const c_void,
    vertex_count: usize,
    vertex_size: usize
) -> usize

Vertex buffer encoder Encodes vertex data into an array of bytes that is generally smaller and compresses better compared to original. Returns encoded data size on success, 0 on error; the only error condition is if buffer doesn't have enough space This function works for a single vertex stream; for multiple vertex streams, call meshopt_encodeVertexBuffer for each stream.

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