pub struct Renderer { /* private fields */ }Implementations§
Source§impl Renderer
impl Renderer
pub fn new( device: Device, queue: Queue, format: TextureFormat, width: u32, height: u32, ) -> Self
pub fn resize(&mut self, width: u32, height: u32)
pub fn camera_mut(&mut self) -> &mut Camera
pub fn camera_ref(&self) -> &Camera
pub fn set_fade(&mut self, fade: f32)
Sourcepub fn configure_surface(
&self,
surface: &Surface<'_>,
config: &SurfaceConfiguration,
)
pub fn configure_surface( &self, surface: &Surface<'_>, config: &SurfaceConfiguration, )
Reconfigure a surface owned by the caller (e.g. GraphView) using this
renderer’s device. GraphView owns surface/config but not the wgpu
Device (that lives inside Renderer), so surface reconfiguration on
resize is routed through here to keep device ownership in one place.
pub fn set_nodes(&mut self, nodes: &[NodeInstanceData])
Sourcepub fn set_labels(&mut self, labels: &[LabelDraw<'_>])
pub fn set_labels(&mut self, labels: &[LabelDraw<'_>])
Record this frame’s label survivors; shapes only labels not already in the shaped-buffer cache.
pub fn set_edges(&mut self, edges: &[EdgeLineData])
pub fn set_halos(&mut self, halos: &[HaloInstanceData])
Sourcepub fn tick(&mut self, dt_ms: f32, dur_ms: f32)
pub fn tick(&mut self, dt_ms: f32, dur_ms: f32)
Advance the camera glide by dt_ms (paced by dur_ms).
Sourcepub fn glide_bounds(&mut self, min: [f32; 2], max: [f32; 2])
pub fn glide_bounds(&mut self, min: [f32; 2], max: [f32; 2])
Glide the camera to frame world-AABB [min,max].
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more