Enum glium::program::BlockLayout
source · 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>,
},
}
Expand description
Layout of a shader storage buffer or a uniform buffer.
Variants§
Struct
Fields
§
members: Vec<(String, BlockLayout)>
The list of elements, with name
/layout
pairs.
Multiple elements, each having a name.
BasicType
Fields
§
ty: UniformType
Type of data.
A basic element.
Array
Fields
§
content: Box<BlockLayout>
Type of data of each element.
A fixed-size array.
For example:
uint data[12];
DynamicSizedArray
Fields
§
content: Box<BlockLayout>
Type of data of each element.
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[];
}
Trait Implementations§
source§impl Clone for BlockLayout
impl Clone for BlockLayout
source§fn clone(&self) -> BlockLayout
fn clone(&self) -> BlockLayout
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BlockLayout
impl Debug for BlockLayout
source§impl PartialEq<BlockLayout> for BlockLayout
impl PartialEq<BlockLayout> for BlockLayout
source§fn eq(&self, other: &BlockLayout) -> bool
fn eq(&self, other: &BlockLayout) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for BlockLayout
impl StructuralEq for BlockLayout
impl StructuralPartialEq for BlockLayout
Auto Trait Implementations§
impl RefUnwindSafe for BlockLayout
impl Send for BlockLayout
impl Sync for BlockLayout
impl Unpin for BlockLayout
impl UnwindSafe for BlockLayout
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more