pub struct Renderer { /* private fields */ }Expand description
Draws frames with a solid pass followed by one textured text pass.
Implementations§
Source§impl Renderer
impl Renderer
pub fn new( device: Device, queue: Queue, format: TextureFormat, atlases: &AtlasSet, scale_factor: f32, ) -> Result<Self>
Sourcepub fn set_scale_factor(&mut self, scale_factor: f32)
pub fn set_scale_factor(&mut self, scale_factor: f32)
Updates the device pixel ratio after a monitor or window change.
Sourcepub fn attach_surface(
&mut self,
surface: Surface<'static>,
config: SurfaceConfiguration,
)
pub fn attach_surface( &mut self, surface: Surface<'static>, config: SurfaceConfiguration, )
Attaches a window surface and configures the swapchain for it.
Sourcepub fn resize(&mut self, width: u32, height: u32)
pub fn resize(&mut self, width: u32, height: u32)
Reconfigures the swapchain after a window resize.
pub fn format(&self) -> TextureFormat
Sourcepub fn upload_atlas(&mut self, atlases: &AtlasSet)
pub fn upload_atlas(&mut self, atlases: &AtlasSet)
Re-uploads the glyph atlas after new characters were rasterized.
Auto Trait Implementations§
impl !Freeze for Renderer
impl !RefUnwindSafe for Renderer
impl !UnwindSafe for Renderer
impl Send for Renderer
impl Sync for Renderer
impl Unpin for Renderer
impl UnsafeUnpin 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