pub struct Renderer { /* private fields */ }Expand description
Draws Scenes with wgpu. Create one per device; it is reused every frame.
Implementations§
Source§impl Renderer
impl Renderer
Sourcepub fn new(device: &Device, queue: &Queue, target_format: TextureFormat) -> Self
pub fn new(device: &Device, queue: &Queue, target_format: TextureFormat) -> Self
Creates the pipelines for rendering into textures of target_format.
Sourcepub fn set_gpu_timing(&mut self, on: bool)
pub fn set_gpu_timing(&mut self, on: bool)
Starts or stops timing the GPU, reported in RenderStats::gpu_time. It stays
off unless asked for, and does nothing on a GPU that cannot tell the time.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Renderer
impl !UnwindSafe for Renderer
impl Freeze for Renderer
impl Send for Renderer
impl Sync for Renderer
impl Unpin for Renderer
impl UnsafeUnpin for Renderer
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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