Skip to main content

index_fits_u16

Function index_fits_u16 

Source
pub const fn index_fits_u16(index: u32) -> bool
Expand description

Whether a vertex index can be named by a Uint16 index buffer.

0xFFFF is the primitive-restart value rather than a vertex index, so a Uint16 buffer can name at most 0xFFFE and an index at or above u16::MAX needs a Uint32 one.