pub struct Renderer { /* private fields */ }Implementations§
Source§impl Renderer
impl Renderer
pub fn render_text(&mut self, text: &TextLayout, pos: Vec2, scale_factor: f32)
pub fn render_text_rotated( &mut self, text: &TextLayout, pos: Vec2, origin: Vec2, rotation: f32, scale_factor: f32, )
pub fn render_text_raw( &mut self, layout: &Layout<()>, real_size: Vec2, color: Color, pos: Vec2, scale_factor: f32, )
pub fn render_text_raw_rotated( &mut self, layout: &Layout<()>, real_size: Vec2, color: Color, pos: Vec2, origin: Vec2, rotation: f32, scale_factor: f32, )
Source§impl Renderer
impl Renderer
pub fn new_with_str_loader<F>( viewport: Vec2, scale_factor: f32, debug_logs: bool, loader_function: F, ) -> Self
pub fn new_with_cstr_loader<F>( viewport: Vec2, scale_factor: f32, debug_logs: bool, loader_function: F, ) -> Self
pub fn clear_textures(&mut self)
pub fn upload_texture(&self, image: RawImage<'_>) -> TextureHandle
pub fn upload_texture_with_interp( &self, image: RawImage<'_>, interpolation: TextureInterpolation, ) -> TextureHandle
pub fn delete_texture(&self, texture: TextureHandle)
pub fn glyph_atlas_debug_view(&mut self, pos_offset: Vec2, quad_size: Vec2)
pub fn glyph_atlas_debug_glyph_priorities( &mut self, pos_offset: Vec2, quad_size: Vec2, )
pub fn reupload_glyph_atlas_texture(&mut self)
Sourcepub fn glyph_atlas_texture(&self) -> (TextureHandle, u32)
pub fn glyph_atlas_texture(&self) -> (TextureHandle, u32)
Returns the texture handle of the glyph atlas, along with its size in pixels (it’s a square, so only one number is returned).
pub fn clear_glyph_atlas(&mut self)
pub fn resize_glyph_atlas_using_window_size(&mut self, width: u32, height: u32)
pub fn create_debug_strip( &mut self, points: &[DebugStripVertex], ) -> DebugStripId
pub fn update_debug_strip( &mut self, id: DebugStripId, points: &[DebugStripVertex], )
pub fn delete_debug_strip(&mut self, debug_strip_id: DebugStripId)
pub fn push_draw_command(&mut self, cmd: DrawCommand)
pub fn push_draw_commands(&mut self, cmds: &[DrawCommand])
pub fn draw_command_count(&self) -> usize
pub fn draw(&mut self)
pub fn resize(&mut self, width: i32, height: i32, scale_factor: f32)
pub fn draw_calls_in_prev_frame(&self) -> usize
pub fn set_clear_color(&mut self, r: f32, g: f32, b: f32, a: f32)
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 UnsafeUnpin 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