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
Multiple elements, each having a name.
Fields
§
members: Vec<(String, BlockLayout)>
The list of elements, with name
/layout
pairs.
BasicType
A basic element.
Fields
§
ty: UniformType
Type of data.
Array
A fixed-size array.
For example:
uint data[12];
Fields
§
content: Box<BlockLayout>
Type of data of each element.
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: Box<BlockLayout>
Type of data of each element.
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 for BlockLayout
impl PartialEq for BlockLayout
impl Eq for BlockLayout
impl StructuralPartialEq for BlockLayout
Auto Trait Implementations§
impl Freeze for BlockLayout
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)