pub struct Renderer { /* private fields */ }
Expand description
A type enabling the rendering of graphics.
Implementations§
Source§impl Renderer
impl Renderer
Sourcepub fn new(
phys_w: NonZeroU32,
phys_h: NonZeroU32,
logic_w: NonZeroU16,
logic_h: NonZeroU16,
) -> Self
pub fn new( phys_w: NonZeroU32, phys_h: NonZeroU32, logic_w: NonZeroU16, logic_h: NonZeroU16, ) -> Self
Create a new Renderer
object assuming the provide “physical”
and logical view dimensions.
Sourcepub fn update_view(
&mut self,
phys_w: NonZeroU32,
phys_h: NonZeroU32,
logic_w: NonZeroU16,
logic_h: NonZeroU16,
)
pub fn update_view( &mut self, phys_w: NonZeroU32, phys_h: NonZeroU32, logic_w: NonZeroU16, logic_h: NonZeroU16, )
Update the view after the containing window or contained logical dimensions have changed.
Sourcepub fn on_pre_render<'ctx>(
&'ctx self,
context: &'ctx mut Context,
) -> ActiveRenderer<'ctx>
pub fn on_pre_render<'ctx>( &'ctx self, context: &'ctx mut Context, ) -> ActiveRenderer<'ctx>
Activate the renderer with the given Context
in preparation
for rendering to take place.
Trait Implementations§
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§
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