pub enum Mode {
TickOnly,
OneFramePerTick,
UnlimitedFrames,
TargetFramesPerSecond(Rate),
}
Expand description
How ticks and frames should relate to one another in a given call to
Metronome::sample
.
Variants§
TickOnly
No rendering is happening. Good for dedicated servers, logic test
suites, minimized games, and other headless applications. Never yields
Frame
.
OneFramePerTick
Try to render exactly one frame per tick. Frame phase will always be
1.0
.
UnlimitedFrames
Try to render as often as possible. This is the preferred value if you
don’t know the refresh rate. Frame phase will be very jittery.
Never returns Idle
.
TargetFramesPerSecond(Rate)
Try to render at the given target framerate. This is the preferred value if you do know the refresh rate. Frame phase will be very regular, especially if there is a simple relationship between tickrate and framerate.
Trait Implementations§
source§impl PartialEq<Mode> for Mode
impl PartialEq<Mode> for Mode
impl Copy for Mode
impl StructuralPartialEq for Mode
Auto Trait Implementations§
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnwindSafe for Mode
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