SDL_GPUStencilOp(3type)
β¨ SDL_GPUStencilOp β¨
okay bestie, welcome to the SDL_GPUStencilOp page π this is one of those SDL3 DATATYPES moments, and honestly? it's giving "tiny enum, huge consequences."
So like, what even is this? It's the enum that says what happens to a stored stencil value when the stencil tests go one way or the other β fail or pass. That's it. That's the whole vibe check. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_gpu.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;
π DESCRIPTION π
okay so picture this: the stencil test just ran, and it either passed or it flopped. What do we do with the value we've got stored? That's the question this enum answers, and ngl it has range. Every option, in order, no skips, we're doing all of them because we are thorough queens π
SDL_GPU_STENCILOP_INVALIDβ the placeholder / "nothing was set" situation. it's just sitting there first in the list, being invalid. πSDL_GPU_STENCILOP_KEEPβ literally leaves the current value exactly as it is. no notes. keeps the current value. periodt.SDL_GPU_STENCILOP_ZEROβ sets the value to0. zero. nada. reset arc. πSDL_GPU_STENCILOP_REPLACEβ sets the value to reference. (yes, the reference. that's what it says.) β¨SDL_GPU_STENCILOP_INCREMENT_AND_CLAMPβ increments the current value and clamps to the maximum value. so it goes up, but it will NOT go past the ceiling, bestie. it knows its limits. π«ΆSDL_GPU_STENCILOP_DECREMENT_AND_CLAMPβ decrements the current value and clamps to0. down it goes, but it stops at zero, no negative energy allowed. πSDL_GPU_STENCILOP_INVERTβ bitwise-inverts the current value. flips every bit, full main character transformation. π₯SDL_GPU_STENCILOP_INCREMENT_AND_WRAPβ increments the current value and wraps back to0. goes up, hits the top, and just... teleports home. π¦SDL_GPU_STENCILOP_DECREMENT_AND_WRAPβ decrements the current value and wraps to the maximum value. goes down past0and reappears at the max, iconic behaviour honestly. β
π AVAILABILITY π
This enum is available since SDL 3.2.0. so if you're on something older... bestie, upgrade. π
π SEE ALSO π
SDL_CreateGPUGraphicsPipeline(3)β because this enum does not live its life alone, iykyk.
and that's the page!! stay slay, keep your stencil values exactly where you want them, and remember: clamp is for girls who respect boundaries and wrap is for girls who live on the edge π β¨
this cutie was brought to you by Simple Directmedia Layer β SDL 3.4.18 β and the page itself is SDL_GPUStencilOp(3type). mwah π
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms