repose_core/present_mode.rs
1/// Preferred GPU present mode for windowed rendering.
2///
3/// The renderer picks the closest supported mode from the surface
4/// capabilities, falling back to an "auto" Fifo-first selection when the
5/// preferred mode is unavailable.
6#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
7pub enum PresentModePref {
8 /// Limit to display refresh using vsync: prefer Fifo, then Mailbox, then
9 /// Immediate. This is the default and matches the renderer's historical
10 /// behavior.
11 #[default]
12 Auto,
13 /// Vsync, always wait for the next vblank (no tearing). Falls back to
14 /// `Auto` if unsupported.
15 Fifo,
16 /// Low latency, waits for the vblank only when a new frame is available
17 /// (no tearing). Falls back to `Auto` if unsupported.
18 Mailbox,
19 /// Present immediately without waiting (may tear). Useful for uncapped
20 /// low-latency rendering. Falls back to `Auto` if unsupported.
21 Immediate,
22}