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

# SDL\_GPUViewport(3type)

A structure specifying a viewport.

## NAME

SDL\_GPUViewport - A structure specifying a viewport.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

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

**typedef struct SDL\_GPUViewport** **{**     **float x;          /\*\*\< The left offset of the viewport. \*/**     **float y;          /\*\*\< The top offset of the viewport. \*/**     **float w;          /\*\*\< The width of the viewport. \*/**     **float h;          /\*\*\< The height of the viewport. \*/**     **float min\_depth;  /\*\*\< The minimum depth of the viewport. \*/**     **float max\_depth;  /\*\*\< The maximum depth of the viewport. \*/** **} SDL\_GPUViewport;**

## AVAILABILITY

This struct is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_SetGPUViewport**(3)](/SDL_SetGPUViewport/3.md)
