pub struct BufferBelt { /* private fields */ }Expand description
A belt of reusable buffer space. Could be useful for temporary data, such as texture staging areas.
Implementations§
Source§impl BufferBelt
impl BufferBelt
Sourcepub fn new(desc: BufferBeltDescriptor) -> Self
pub fn new(desc: BufferBeltDescriptor) -> Self
Create a new belt.
Sourcepub fn alloc(&mut self, size: u64, gpu: &Context) -> BufferPiece
pub fn alloc(&mut self, size: u64, gpu: &Context) -> BufferPiece
Allocate a region of size bytes.
Sourcepub fn alloc_bytes(&mut self, data: &[u8], gpu: &Context) -> BufferPiece
pub fn alloc_bytes(&mut self, data: &[u8], gpu: &Context) -> BufferPiece
Allocate a region to hold the byte data slice contents.
Sourcepub unsafe fn alloc_typed<T>(
&mut self,
data: &[T],
gpu: &Context,
) -> BufferPiece
pub unsafe fn alloc_typed<T>( &mut self, data: &[T], gpu: &Context, ) -> BufferPiece
Allocate a region to hold the typed data slice contents.
Auto Trait Implementations§
impl Freeze for BufferBelt
impl RefUnwindSafe for BufferBelt
impl Send for BufferBelt
impl Sync for BufferBelt
impl Unpin for BufferBelt
impl UnwindSafe for BufferBelt
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