pub struct Frame<'d> { /* private fields */ }
Expand description
The type that represented a current frame and creates new layers.
Implementations§
source§impl<'d> Frame<'d>
impl<'d> Frame<'d>
sourcepub fn commit_in_frame(&mut self)
pub fn commit_in_frame(&mut self)
Draws the frame in the screen buffer.
You usually don’t need to call this method manually.
It is called automatically at the end of the Frame
lifetime.
It can be useful if you want to partially render a frame in multiple layers.
Example
// Create a new layer
let mut layer = frame
.texture_layer()
.start();
// Draw something in the layer
// Drop the layer to release a frame
drop(layer);
// Commit the layer in frame
frame.commit_in_frame();