Skip to main content

text_upload_bytes

Function text_upload_bytes 

Source
pub fn text_upload_bytes(text_calls: &[TextDrawCall], align: u64) -> u64
Expand description

Total bytes a frame’s text geometry occupies in a backend’s per-frame upload buffer, once each label’s vertex and index blocks start on an align-byte boundary. Every sub-allocation aligns its start up and a prior aligned start plus an aligned size stays aligned, so this sum is an exact upper bound on the buffer cursor after all of a frame’s blocks are appended: a slot reserved to it can never overflow mid-frame.

align is per backend: the alignment its buffer bindings require of a sub-range’s offset.