pub struct Renderer { /* private fields */ }Implementations§
Source§impl Renderer
impl Renderer
Sourcepub fn new(
device: &Device,
texture_format: &TextureFormat,
multisample: MultisampleState,
depth_stencil: Option<DepthStencilState>,
) -> Self
pub fn new( device: &Device, texture_format: &TextureFormat, multisample: MultisampleState, depth_stencil: Option<DepthStencilState>, ) -> Self
Create all unchanging resources here.
Sourcepub fn prepare(
&mut self,
device: &Device,
queue: &Queue,
width: f32,
height: f32,
atlas: &mut Atlas,
items: Vec<(Area, Item)>,
)
pub fn prepare( &mut self, device: &Device, queue: &Queue, width: f32, height: f32, atlas: &mut Atlas, items: Vec<(Area, Item)>, )
Prepare for rendering this frame; create all resources that will be used during the next render that do not already exist.
Items are given a z_index based on the order in which they are presented. First item in the vector will be printed in the back of the stack(z = u16::MAX-1)
Sourcepub fn render<'a>(&'a self, render_pass: &mut RenderPass<'a>)
pub fn render<'a>(&'a self, render_pass: &mut RenderPass<'a>)
Render using caller provided render pass.
Auto Trait Implementations§
impl Freeze for Renderer
impl !RefUnwindSafe for Renderer
impl Send for Renderer
impl Sync for Renderer
impl Unpin for Renderer
impl !UnwindSafe for Renderer
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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