pub struct UniformBuffer { /* private fields */ }Implementations§
Source§impl UniformBuffer
impl UniformBuffer
Sourcepub fn new(context: &Context, data: Option<&[u8]>, size: usize) -> Self
pub fn new(context: &Context, data: Option<&[u8]>, size: usize) -> Self
UniformBuffer(context, data, size); data == None is the C++ null
pointer.
Sourcepub fn clone_buffer(&self) -> Self
pub fn clone_buffer(&self) -> Self
clone(): a new buffer of the same size; contents are not copied
(C++: “We can’t directly copy buffer contents in WebGPU without a
command encoder”).
pub fn get_buffer(&self) -> Option<&Buffer>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for UniformBuffer
impl !Send for UniformBuffer
impl !Sync for UniformBuffer
impl !UnwindSafe for UniformBuffer
impl Forget for UniformBuffer
impl Freeze for UniformBuffer
impl Unpin for UniformBuffer
impl UnsafeUnpin for UniformBuffer
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