Struct wgpu_util::BufferPool
source · [−]pub struct BufferPool { /* private fields */ }Expand description
A wgpu::Buffer Pool (dynamic supply).
Implementations
sourceimpl BufferPool
impl BufferPool
sourcepub fn new(descriptor: &BufferPoolDescriptor<'_>) -> Self
pub fn new(descriptor: &BufferPoolDescriptor<'_>) -> Self
Creates a new empty pool.
sourcepub fn upload(
&mut self,
device: &Device,
queue: &Queue,
contents: &[u8]
) -> usize
pub fn upload(
&mut self,
device: &Device,
queue: &Queue,
contents: &[u8]
) -> usize
Upload contents to a vacant buffer.
Returns buffer index. If no vacant buffer is available, a new one is allocated.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for BufferPool
impl Send for BufferPool
impl Sync for BufferPool
impl Unpin for BufferPool
impl !UnwindSafe for BufferPool
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more