pub struct Renderer {
pub(crate) width: u32,
pub(crate) height: u32,
pub(crate) world: World,
}Fields§
§width: u32§height: u32§world: WorldImplementations§
Source§impl Renderer
impl Renderer
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn ratio(&self) -> f32
pub fn new( ctx: &WgpuContext, width: u32, height: u32, oit_layers: usize, ) -> Self
pub fn new_render_textures(&self, ctx: &WgpuContext) -> RenderTextures
Sourcepub fn render_frame(
&mut self,
render_textures: &mut RenderTextures,
clear_color: Color,
frame: &RenderFrame,
)
pub fn render_frame( &mut self, render_textures: &mut RenderTextures, clear_color: Color, frame: &RenderFrame, )
Reconcile and render one evaluated frame.
Sourcepub fn take_last_gpu_scopes(&mut self) -> Option<Vec<GpuTimerQueryResult>>
pub fn take_last_gpu_scopes(&mut self) -> Option<Vec<GpuTimerQueryResult>>
Take the GPU timer scopes recorded for the most recent processed frame (empty unless GPU timers are enabled and the device supports timestamp queries).
Sourcepub fn gpu_timers_supported(&self) -> bool
pub fn gpu_timers_supported(&self) -> bool
Whether the device supports GPU timestamp queries.
Sourcepub fn gpu_timers_enabled(&self) -> bool
pub fn gpu_timers_enabled(&self) -> bool
Whether GPU timer scopes are currently being recorded (see
Renderer::set_gpu_timers_enabled).
Sourcepub fn set_gpu_timers_enabled(&mut self, on: bool)
pub fn set_gpu_timers_enabled(&mut self, on: bool)
Enable/disable GPU timer recording at runtime. While enabled, each frame pays a device poll to read the timers back.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ConditionalSend for Twhere
T: Send,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> TransformedExt for T
impl<T> TransformedExt for T
Source§fn transformed<G>(self, transform: G) -> Transformed<Self, G>
fn transformed<G>(self, transform: G) -> Transformed<Self, G>
Return
self wrapped with transform stored exactly as G.