Trait glsl_layout::Uniform

source ·
pub trait Uniform: Copy {
    type Align: Copy + Default;
    type Std140: Std140;

    fn std140(&self) -> Self::Std140;
}
Expand description

Structure to transform data from rust’s structure to the raw data ready to upload to UBO. Users should prefer to use derive(Uniform) instead of implementing this manually.

Required Associated Types§

ZST that enforces alignment required for this type.

Type that contain same data with memory layout matching glsl’s layout(std140).

Required Methods§

Get aligned data from structure.

Implementations on Foreign Types§

Implementors§