Enum glium::program::BlockLayout [] [src]

pub enum BlockLayout {
    Struct {
        members: Vec<(String, BlockLayout)>,
    },
    BasicType {
        ty: UniformType,
        offset_in_buffer: usize,
    },
    Array {
        content: Box<BlockLayout>,
        length: usize,
    },
    DynamicSizedArray {
        content: Box<BlockLayout>,
    },
}

Layout of a shader storage buffer or a uniform buffer.

Variants

Struct

Multiple elements, each having a name.

Fields

members

The list of elements, with name/layout pairs.

BasicType

A basic element.

Fields

ty

Type of data.

offset_in_buffer

Offset of this element in bytes from the start of the buffer.

Array

A fixed-size array.

For example:

uint data[12];

Fields

content

Type of data of each element.

length

Number of elements in the array.

DynamicSizedArray

An array whose size isn't known at compile-time. Can only be used as the last element of a buffer.

Its actual size depends on the size of the buffer.

For example:

buffer MyBuffer {
    uint data[];
}

Fields

content

Type of data of each element.

Trait Implementations

Derived Implementations

impl Eq for BlockLayout

impl PartialEq for BlockLayout

fn eq(&self, __arg_0: &BlockLayout) -> bool

fn ne(&self, __arg_0: &BlockLayout) -> bool

impl Clone for BlockLayout

fn clone(&self) -> BlockLayout

fn clone_from(&mut self, source: &Self)

impl Debug for BlockLayout

fn fmt(&self, __arg_0: &mut Formatter) -> Result