pub struct RenderSystem {
pub draw_calls: u32,
pub visible: u32,
pub quality: Quality,
/* private fields */
}Expand description
Frame submission system: cull + count what would be drawn, then
batch according to the current Quality.
Fields§
§draw_calls: u32§visible: u32§quality: QualityCurrent tier; starts at High and moves only through
RenderSystem::observe_frame.
Implementations§
Source§impl RenderSystem
impl RenderSystem
pub fn new() -> Self
Sourcepub fn observe_frame(&mut self, avg_ms: f32, budget_ms: f32)
pub fn observe_frame(&mut self, avg_ms: f32, budget_ms: f32)
Feed the governor one frame’s average time (from
Scheduler::avg_frame_ms) and the budget it is graded against.
Sustained overruns step quality down; sustained runs with real
headroom step it back up. Everything between resets both
streaks — the middle of the budget is where we want to stay.
Trait Implementations§
Source§impl Default for RenderSystem
impl Default for RenderSystem
Auto Trait Implementations§
impl Freeze for RenderSystem
impl RefUnwindSafe for RenderSystem
impl Send for RenderSystem
impl Sync for RenderSystem
impl Unpin for RenderSystem
impl UnsafeUnpin for RenderSystem
impl UnwindSafe for RenderSystem
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