---
name: "SDL_GPUStencilOp"
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_GPUStencilOp"
---

# SDL\_GPUStencilOp(3type)

Specifies what happens to a stored stencil value if stencil tests fail or pass.

## NAME

SDL\_GPUStencilOp - Specifies what happens to a stored stencil value if stencil tests fail or pass.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

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

**typedef enum SDL\_GPUStencilOp** **{**     **SDL\_GPU\_STENCILOP\_INVALID,**     **SDL\_GPU\_STENCILOP\_KEEP,                 /\*\*\< Keeps the current value. \*/**     **SDL\_GPU\_STENCILOP\_ZERO,                 /\*\*\< Sets the value to 0. \*/**     **SDL\_GPU\_STENCILOP\_REPLACE,              /\*\*\< Sets the value to reference. \*/**     **SDL\_GPU\_STENCILOP\_INCREMENT\_AND\_CLAMP,  /\*\*\< Increments the current value and clamps to the maximum value. \*/**     **SDL\_GPU\_STENCILOP\_DECREMENT\_AND\_CLAMP,  /\*\*\< Decrements the current value and clamps to 0. \*/**     **SDL\_GPU\_STENCILOP\_INVERT,               /\*\*\< Bitwise-inverts the current value. \*/**     **SDL\_GPU\_STENCILOP\_INCREMENT\_AND\_WRAP,   /\*\*\< Increments the current value and wraps back to 0. \*/**     **SDL\_GPU\_STENCILOP\_DECREMENT\_AND\_WRAP    /\*\*\< Decrements the current value and wraps to the maximum value. \*/** **} SDL\_GPUStencilOp;**

## AVAILABILITY

This enum is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_CreateGPUGraphicsPipeline**(3)](/SDL_CreateGPUGraphicsPipeline/3.md)
