pub struct UniformSlice { /* private fields */ }Expand description
One entry in the dynamic-offset list passed to
set_bind_group_with_dynamic_offsets.
A uniform buffer that a shader declares with hasDynamicOffset: true
can hold many independent records back to back, and the bind group
picks one per draw by adding an offset. Grouping the pair into a struct
keeps the two values together at the call site, where writing them as
two separate positional arguments is easy to transpose.
Implementations§
Source§impl UniformSlice
impl UniformSlice
pub fn get_offset(&self) -> u64
pub fn get_mut_offset(&mut self) -> &mut u64
pub fn set_offset(&mut self, val: u64) -> &mut Self
pub fn get_size(&self) -> u64
pub fn get_mut_size(&mut self) -> &mut u64
pub fn set_size(&mut self, val: u64) -> &mut Self
Trait Implementations§
Source§impl Clone for UniformSlice
impl Clone for UniformSlice
impl Copy for UniformSlice
Source§impl Debug for UniformSlice
impl Debug for UniformSlice
Auto Trait Implementations§
impl Freeze for UniformSlice
impl RefUnwindSafe for UniformSlice
impl Send for UniformSlice
impl Sync for UniformSlice
impl Unpin for UniformSlice
impl UnsafeUnpin for UniformSlice
impl UnwindSafe for UniformSlice
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