pub enum Timing {
Vsync,
Immediate,
VsyncLimitFPS(f64),
ImmediateLimitFPS(f64),
}
Expand description
The timing strategy used on every frame advance.
Variants§
Vsync
The best, smoothest option! Frame timing will be perfectly in sync with the display. However, you will need to use delta-timing in your game logic to account for different display frequencies, considering that that both 60Hz and 120Hz displays are common.
Immediate
Simply draw as fast as possible. Will max out CPU use, drain battery faster, etc.
VsyncLimitFPS(f64)
Like Vsync, but prevents frame rate from going past a limit. Easier said than done, micro stutter CAN HAPPEN If the display frequency doesn’t match the limit, and the results will also vary wildly per platform.
ImmediateLimitFPS(f64)
Simply limits the frame rate without attempting Vsync. May yield better results on some platforms.
Trait Implementations§
impl StructuralPartialEq for Timing
Auto Trait Implementations§
impl Freeze for Timing
impl RefUnwindSafe for Timing
impl Send for Timing
impl Sync for Timing
impl Unpin for Timing
impl UnwindSafe for Timing
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