---
name: "SDL_SetGPUSwapchainParameters"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_SetGPUSwapchainParameters"
---

# SDL\_SetGPUSwapchainParameters(3)

Changes the swapchain parameters for the given claimed window.

## NAME

SDL\_SetGPUSwapchainParameters - Changes the swapchain parameters for the given claimed window.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**bool SDL\_SetGPUSwapchainParameters(**     **SDL\_GPUDevice \*device,**     **SDL\_Window \*window,**     **SDL\_GPUSwapchainComposition swapchain\_composition,**     **SDL\_GPUPresentMode present\_mode);**

## DESCRIPTION

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.

## FUNCTION PARAMETERS

- *device*

  a GPU context.

- *window*

  an  **SDL\_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.

## SEE ALSO

**•**(3), [**SDL\_WindowSupportsGPUPresentMode**(3)](/SDL_WindowSupportsGPUPresentMode/3.md), **•**(3), [**SDL\_WindowSupportsGPUSwapchainComposition**(3)](/SDL_WindowSupportsGPUSwapchainComposition/3.md)
