---
name: "SDL_GPUColorTargetInfo"
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_GPUColorTargetInfo"
---

# SDL\_GPUColorTargetInfo(3type)

A structure specifying the parameters of a color target used by a render pass.

## NAME

SDL\_GPUColorTargetInfo - A structure specifying the parameters of a color target used by a render pass.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

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

**typedef struct SDL\_GPUColorTargetInfo** **{**     **SDL\_GPUTexture \*texture;         /\*\*\< The texture that will be used as a color target by a render pass. \*/**     **Uint32 mip\_level;                /\*\*\< The mip level to use as a color target. \*/**     **Uint32 layer\_or\_depth\_plane;     /\*\*\< The layer index or depth plane to use as a color target. This value is treated as a layer index on 2D array and cube textures, and as a depth plane on 3D textures. \*/**     **SDL\_FColor clear\_color;          /\*\*\< The color to clear the color target to at the start of the render pass. Ignored if SDL\_GPU\_LOADOP\_CLEAR is not used. \*/**     **SDL\_GPULoadOp load\_op;           /\*\*\< What is done with the contents of the color target at the beginning of the render pass. \*/**     **SDL\_GPUStoreOp store\_op;         /\*\*\< What is done with the results of the render pass. \*/**     **SDL\_GPUTexture \*resolve\_texture; /\*\*\< The texture that will receive the results of a multisample resolve operation. Ignored if a RESOLVE\* store\_op is not used. \*/**     **Uint32 resolve\_mip\_level;        /\*\*\< The mip level of the resolve texture to use for the resolve operation. Ignored if a RESOLVE\* store\_op is not used. \*/**     **Uint32 resolve\_layer;            /\*\*\< The layer index of the resolve texture to use for the resolve operation. Ignored if a RESOLVE\* store\_op is not used. \*/**     **bool cycle;                  /\*\*\< true cycles the texture if the texture is bound and load\_op is not LOAD \*/**     **bool cycle\_resolve\_texture;  /\*\*\< true cycles the resolve texture if the resolve texture is bound. Ignored if a RESOLVE\* store\_op is not used. \*/**     **Uint8 padding1;**     **Uint8 padding2;** **} SDL\_GPUColorTargetInfo;**

## DESCRIPTION

The load\_op field determines what is done with the texture at the beginning of the render pass.

• LOAD: Loads the data currently in the texture. Not recommended for\
   multisample textures as it requires significant memory bandwidth.

• CLEAR: Clears the texture to a single color.

• DONT\_CARE: The driver will do whatever it wants with the texture memory.\
   This is a good option if you know that every single pixel will be touched\
   in the render pass.

The store\_op field determines what is done with the color results of the render pass.

• STORE: Stores the results of the render pass in the texture. Not\
   recommended for multisample textures as it requires significant memory\
   bandwidth.

• DONT\_CARE: The driver will do whatever it wants with the texture memory.\
   This is often a good option for depth/stencil textures.

• RESOLVE: Resolves a multisample texture into resolve\_texture, which must\
   have a sample count of 1. Then the driver may discard the multisample\
   texture memory. This is the most performant method of resolving a\
   multisample target.

• RESOLVE\_AND\_STORE: Resolves a multisample texture into the\
   resolve\_texture, which must have a sample count of 1. Then the driver\
   stores the multisample texture's contents. Not recommended as it requires\
   significant memory bandwidth.

## AVAILABILITY

This struct is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_BeginGPURenderPass**(3)](/SDL_BeginGPURenderPass/3.md)
