SDL_SetGPUSwapchainParameters

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.

extern (C) nothrow @nogc extern
bool
SDL_SetGPUSwapchainParameters

Parameters

device SDL_GPUDevice*

a GPU context.

window SDL_Window*

an SDL_Window that has been claimed.

swapchain_composition SDL_GPUSwapchainComposition

the desired composition of the swapchain.

present_mode SDL_GPUPresentMode

the desired present mode for the swapchain.

Return Value

Type: bool

true if successful, false on error; call SDL_GetError() for more information.

See Also

Meta