Function meshopt_rs::index::buffer::decode_index_buffer
source · [−]pub fn decode_index_buffer<T>(
destination: &mut [T],
buffer: &[u8]
) -> Result<(), DecodeError>where
T: Copy + From<u32>,
Expand description
Decodes index data from an array of bytes generated by encode_index_buffer.
Returns Ok
if decoding was successful, and an error otherwise.
The decoder is safe to use for untrusted input, but it may produce garbage data (e.g. out of range indices).
Arguments
destination
: must contain the exact space for the resulting index buffer