Skip to main content

std140_layout

Function std140_layout 

pub fn std140_layout(fields: &[(&str, Std140Type)]) -> (Vec<Std140Field>, u32)
Expand description

Calculate the std140 layout for a list of named fields.

Returns the field offsets and the total buffer size (rounded up to the struct alignment, which is 16 bytes under std140).