Trait glsl_layout::Uniform[][src]

pub trait Uniform: Copy {
    type Align: Copy;
    type Std140: Std140;
    fn align() -> Self::Align;
fn std140(&self) -> Self::Std140; }

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

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

The value of the Align.

Get aligned data from structure.

Implementations on Foreign Types

impl<T> Uniform for [T; 0] where
    T: Uniform
[src]

impl<T> Uniform for [T; 1] where
    T: Uniform
[src]

impl<T> Uniform for [T; 2] where
    T: Uniform
[src]

impl<T> Uniform for [T; 3] where
    T: Uniform
[src]

impl<T> Uniform for [T; 4] where
    T: Uniform
[src]

Implementors