logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_GPUPresentMode - Specifies the timing that will be used to present swapchain textures to the OS.

Availability

       This enum is available since SDL 3.2.0.

Description

       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.

Header File

       Defined in SDL3/SDL_gpu.h

Name

       SDL_GPUPresentMode - Specifies the timing that will be used to present swapchain textures to the OS.

See Also

(3),      SDL_SetGPUSwapchainParameters(3),     (3),     SDL_WindowSupportsGPUPresentMode(3),     (3),
       SDL_WaitAndAcquireGPUSwapchainTexture(3)

Simple Directmedia Layer                           SDL 3.2.10                          SDL_GPUPresentMode(3type)

Synopsis

#include"SDL3/SDL.h"typedefenumSDL_GPUPresentMode{SDL_GPU_PRESENTMODE_VSYNC,SDL_GPU_PRESENTMODE_IMMEDIATE,SDL_GPU_PRESENTMODE_MAILBOX}SDL_GPUPresentMode;

See Also