#[repr(transparent)]pub struct SDL_GPUPresentMode(pub c_uint);Expand description
Specifies the timing that will be used to present swapchain textures to the OS.
VSYNC mode will always be supported. IMMEDIATE and MAILBOX modes may not be supported on certain systems.
It is recommended to query SDL_WindowSupportsGPUPresentMode after claiming the window if you wish to change the present mode to IMMEDIATE or MAILBOX.
- VSYNC: Waits for vblank before presenting. No tearing is possible. If there is a pending image to present, the new image is enqueued for presentation. Disallows tearing at the cost of visual latency.
- IMMEDIATE: Immediately presents. Lowest latency option, but tearing may occur.
- MAILBOX: Waits for vblank before presenting. No tearing is possible. If there is a pending image to present, the pending image is replaced by the new image. Similar to VSYNC, but with reduced visual latency.
Available Since: This enum is available since SDL 3.2.0.
See Also: SDL_SetGPUSwapchainParameters See Also: SDL_WindowSupportsGPUPresentMode See Also: SDL_WaitAndAcquireGPUSwapchainTexture
Tuple Fields§
§0: c_uintImplementations§
Trait Implementations§
Source§impl Clone for SDL_GPUPresentMode
impl Clone for SDL_GPUPresentMode
Source§fn clone(&self) -> SDL_GPUPresentMode
fn clone(&self) -> SDL_GPUPresentMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SDL_GPUPresentMode
impl Debug for SDL_GPUPresentMode
Source§impl Hash for SDL_GPUPresentMode
impl Hash for SDL_GPUPresentMode
Source§impl PartialEq for SDL_GPUPresentMode
impl PartialEq for SDL_GPUPresentMode
impl Copy for SDL_GPUPresentMode
impl Eq for SDL_GPUPresentMode
impl StructuralPartialEq for SDL_GPUPresentMode
Auto Trait Implementations§
impl Freeze for SDL_GPUPresentMode
impl RefUnwindSafe for SDL_GPUPresentMode
impl Send for SDL_GPUPresentMode
impl Sync for SDL_GPUPresentMode
impl Unpin for SDL_GPUPresentMode
impl UnsafeUnpin for SDL_GPUPresentMode
impl UnwindSafe for SDL_GPUPresentMode
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