Function SDL_SetGPUSwapchainParameters
pub unsafe extern "C" fn SDL_SetGPUSwapchainParameters(
device: *mut SDL_GPUDevice,
window: *mut SDL_Window,
swapchain_composition: SDL_GPUSwapchainComposition,
present_mode: SDL_GPUPresentMode,
) -> bool
Available on crate feature
dep_sdl3
only.Expand description
Changes the swapchain parameters for the given claimed window.
This function will fail if the requested present mode or swapchain
composition are unsupported by the device. Check if the parameters are
supported via SDL_WindowSupportsGPUPresentMode
/
SDL_WindowSupportsGPUSwapchainComposition
prior to calling this function.
SDL_GPU_PRESENTMODE_VSYNC
and SDL_GPU_SWAPCHAINCOMPOSITION_SDR
are always
supported.
§Parameters
device
: a GPU context.window
: anSDL_Window
that has been claimed.swapchain_composition
: the desired composition of the swapchain.present_mode
: the desired present mode for the swapchain.
§Return value
Returns true if successful, false on error; call [SDL_GetError()
] for more
information.
§Availability
This function is available since SDL 3.2.0.