pub struct WgpuRenderer { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Renderer2D for WgpuRenderer
impl Renderer2D for WgpuRenderer
fn begin_frame(&mut self) -> Result<()>
fn draw_sprite(&mut self, texture: &str, x: f64, y: f64) -> Result<()>
Source§fn draw_sprite_frame(
&mut self,
texture: &str,
frame: Option<&str>,
x: f64,
y: f64,
) -> Result<()>
fn draw_sprite_frame( &mut self, texture: &str, frame: Option<&str>, x: f64, y: f64, ) -> Result<()>
Draw
texture, optionally from one named atlas frame. The default
ignores the frame, so impls without atlas support stay correct.fn draw_rect( &mut self, x: f64, y: f64, w: f64, h: f64, color: [u8; 4], ) -> Result<()>
fn draw_text( &mut self, text: &str, x: f64, y: f64, size: f32, color: [u8; 4], ) -> Result<()>
fn end_frame(&mut self) -> Result<()>
fn set_camera(&mut self, x: f64, y: f64, zoom: f64)
fn reload_asset(&mut self, path: &str)
fn clear_asset_cache(&mut self)
Auto Trait Implementations§
impl !Freeze for WgpuRenderer
impl !RefUnwindSafe for WgpuRenderer
impl !UnwindSafe for WgpuRenderer
impl Send for WgpuRenderer
impl Sync for WgpuRenderer
impl Unpin for WgpuRenderer
impl UnsafeUnpin for WgpuRenderer
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