pub enum PresentModePref {
Auto,
Fifo,
Mailbox,
Immediate,
}Expand description
Preferred GPU present mode for windowed rendering.
The renderer picks the closest supported mode from the surface capabilities, falling back to an “auto” Fifo-first selection when the preferred mode is unavailable.
Variants§
Auto
Limit to display refresh using vsync: prefer Fifo, then Mailbox, then Immediate. This is the default and matches the renderer’s historical behavior.
Fifo
Vsync, always wait for the next vblank (no tearing). Falls back to
Auto if unsupported.
Mailbox
Low latency, waits for the vblank only when a new frame is available
(no tearing). Falls back to Auto if unsupported.
Immediate
Present immediately without waiting (may tear). Useful for uncapped
low-latency rendering. Falls back to Auto if unsupported.
Trait Implementations§
Source§impl Clone for PresentModePref
impl Clone for PresentModePref
Source§fn clone(&self) -> PresentModePref
fn clone(&self) -> PresentModePref
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PresentModePref
Source§impl Debug for PresentModePref
impl Debug for PresentModePref
Source§impl Default for PresentModePref
impl Default for PresentModePref
Source§fn default() -> PresentModePref
fn default() -> PresentModePref
Returns the “default value” for a type. Read more
impl Eq for PresentModePref
Source§impl PartialEq for PresentModePref
impl PartialEq for PresentModePref
impl StructuralPartialEq for PresentModePref
Auto Trait Implementations§
impl Freeze for PresentModePref
impl RefUnwindSafe for PresentModePref
impl Send for PresentModePref
impl Sync for PresentModePref
impl Unpin for PresentModePref
impl UnsafeUnpin for PresentModePref
impl UnwindSafe for PresentModePref
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