---
name: "SDL_BeginGPURenderPass"
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_BeginGPURenderPass"
---

# SDL\_BeginGPURenderPass(3)

Begins a render pass on a command buffer.

## NAME

SDL\_BeginGPURenderPass - Begins a render pass on a command buffer.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

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

**SDL\_GPURenderPass \* SDL\_BeginGPURenderPass(**     **SDL\_GPUCommandBuffer \*command\_buffer,**     **const SDL\_GPUColorTargetInfo \*color\_target\_infos,**     **Uint32 num\_color\_targets,**     **const SDL\_GPUDepthStencilTargetInfo \*depth\_stencil\_target\_info);**

## DESCRIPTION

A render pass consists of a set of texture subresources (or depth slices in the 3D texture case) which will be rendered to during the render pass, along with corresponding clear values and load/store operations. All operations related to graphics pipelines must take place inside of a render pass. A default viewport and scissor state are automatically set when this is called. You cannot begin another render pass, or begin a compute pass or copy pass until you have ended the render pass.

## FUNCTION PARAMETERS

- *command\_buffer*

  a command buffer.

- *color\_target\_infos*

  an array of texture subresources with corresponding clear values and load/store ops.

- *num\_color\_targets*

  the number of color targets in the color\_target\_infos array.

- *depth\_stencil\_target\_info*

  a texture subresource with corresponding clear value and load/store ops, may be NULL.

## RETURN VALUE

( **SDL\_GPURenderPass**\
  \*) Returns a render pass handle.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_EndGPURenderPass**(3)](/SDL_EndGPURenderPass/3.md)
