pub struct GpuBufferWriter<'a, T> {
    buffer: &'a mut Vec<T, FrameAllocator>,
    deferred: &'a mut Vec<DeferredBlock>,
    index: usize,
    block_count: usize,
}Expand description
Interface to allow writing multiple GPU blocks, possibly of different types
Fields§
§buffer: &'a mut Vec<T, FrameAllocator>§deferred: &'a mut Vec<DeferredBlock>§index: usize§block_count: usizeImplementations§
Source§impl<'a, T> GpuBufferWriter<'a, T>where
    T: Texel,
 
impl<'a, T> GpuBufferWriter<'a, T>where
    T: Texel,
fn new( buffer: &'a mut Vec<T, FrameAllocator>, deferred: &'a mut Vec<DeferredBlock>, index: usize, block_count: usize, ) -> Self
Sourcepub fn push_one<B>(&mut self, block: B)where
    B: Into<T>,
 
pub fn push_one<B>(&mut self, block: B)where
    B: Into<T>,
Push one (16 byte) block of data in to the writer
Sourcepub fn push_render_task(&mut self, task_id: RenderTaskId)
 
pub fn push_render_task(&mut self, task_id: RenderTaskId)
Push a reference to a render task in to the writer. Once the render task graph is resolved, this will be patched with the UV rect of the task
Sourcepub fn finish(self) -> GpuBufferAddress
 
pub fn finish(self) -> GpuBufferAddress
Close this writer, returning the GPU address of this set of block(s).
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for GpuBufferWriter<'a, T>
impl<'a, T> RefUnwindSafe for GpuBufferWriter<'a, T>where
    T: RefUnwindSafe,
impl<'a, T> Send for GpuBufferWriter<'a, T>where
    T: Send,
impl<'a, T> !Sync for GpuBufferWriter<'a, T>
impl<'a, T> Unpin for GpuBufferWriter<'a, T>
impl<'a, T> !UnwindSafe for GpuBufferWriter<'a, T>
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> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more