---
name: "SDL_SetGPUViewport"
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_SetGPUViewport"
---

# SDL\_SetGPUViewport(3)

Sets the current viewport state on a command buffer.

## NAME

SDL\_SetGPUViewport - Sets the current viewport state on a command buffer.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

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

**void SDL\_SetGPUViewport(**     **SDL\_GPURenderPass \*render\_pass,**     **const SDL\_GPUViewport \*viewport);**

## FUNCTION PARAMETERS

- *render\_pass*

  a render pass handle.

- *viewport*

  the viewport to set.

## AVAILABILITY

This function is available since SDL 3.2.0.
