pub struct CurrentFrame<B: Backend> { /* private fields */ }Expand description
Resource holding the frame acquired at the start of each render tick.
Populated by RenderPlugin
during PreRender and consumed during
PostRender. Check
is_active before attempting to render.
Implementations§
Source§impl<B: Backend> CurrentFrame<B>
impl<B: Backend> CurrentFrame<B>
Sourcepub fn render_context(
&mut self,
clear: [f32; 4],
) -> Option<<B::Frame as FrameOperations>::Context<'_>>
pub fn render_context( &mut self, clear: [f32; 4], ) -> Option<<B::Frame as FrameOperations>::Context<'_>>
Begin a simple full-screen color pass, clearing to clear.
Returns None if no frame is active.
Sourcepub fn begin_pass(
&mut self,
pass: Pass<'_, B::Frame>,
) -> Option<<B::Frame as FrameOperations>::Context<'_>>
pub fn begin_pass( &mut self, pass: Pass<'_, B::Frame>, ) -> Option<<B::Frame as FrameOperations>::Context<'_>>
Begin an arbitrary render pass described by pass.
Returns None if no frame is active.
Auto Trait Implementations§
impl<B> Freeze for CurrentFrame<B>
impl<B> RefUnwindSafe for CurrentFrame<B>
impl<B> Send for CurrentFrame<B>
impl<B> Sync for CurrentFrame<B>
impl<B> Unpin for CurrentFrame<B>
impl<B> UnsafeUnpin for CurrentFrame<B>
impl<B> UnwindSafe for CurrentFrame<B>
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