#[repr(C)]pub struct Globals {
pub viewport: [f32; 2],
pub _pad: [f32; 2],
}Expand description
Per-frame uniform block matching the WGSL Globals struct.
Padded to 16 bytes to satisfy the uniform-buffer alignment rules.
Fields§
§viewport: [f32; 2]Viewport [width, height] in physical pixels.
_pad: [f32; 2]Padding to round the struct up to a 16-byte boundary.
Implementations§
Trait Implementations§
impl Copy for Globals
impl Pod for Globals
impl StructuralPartialEq for Globals
Auto Trait Implementations§
impl Freeze for Globals
impl RefUnwindSafe for Globals
impl Send for Globals
impl Sync for Globals
impl Unpin for Globals
impl UnsafeUnpin for Globals
impl UnwindSafe for Globals
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.