encode_instanced

Function encode_instanced 

Source
pub fn encode_instanced(
    meshes: &[Mesh],
    collated: &Collated,
    entity_id: impl Fn(usize) -> u32,
    color: impl Fn(usize) -> [f32; 4],
) -> Vec<u8> ⓘ
Expand description

encode_refs over geometry Mesh values, with id/colour accessor closures (thin wrapper, no geometry clone).

PREFER encode_refs. This wrapper cannot express the per-occurrence item_id — a Mesh does not carry one and there is no closure for it — so every shard it writes declares the 88-byte stride and no host can drill from a rendered piece back to its representation item. It is kept because it is published crate API; nothing in this repo calls it outside the tests.