SDL_GPUStencilOpState(3type)

πŸ’… SDL_GPUStencilOpState πŸ’…

okay so bestie, welcome to the SDL3 DATATYPES corner of the manual, where we talk about SDL_GPUStencilOpState β€” a structure specifying the stencil operation state of a graphics pipeline. yes it's a mouthful, no you don't have to say it out loud at parties. ✨


🌸 NAME 🌸

SDL_GPUStencilOpState β€” a structure specifying the stencil operation state of a graphics pipeline.

like, it's the lil bundle of vibes that tells your pipeline what to do with stencil samples depending on whether they passed or flopped the tests. it's giving gatekeeper energy but for pixels. πŸŽ€


✨ SYNOPSIS ✨

first things first, you gotta pull it in:

#include <SDL3/SDL_gpu.h>

and here's the whole struct, look at her πŸ‘‘

typedef struct SDL_GPUStencilOpState
{
    SDL_GPUStencilOp fail_op;        /**< The action performed on samples that fail the stencil test. */
    SDL_GPUStencilOp pass_op;        /**< The action performed on samples that pass the depth and stencil tests. */
    SDL_GPUStencilOp depth_fail_op;  /**< The action performed on samples that pass the stencil test and fail the depth test. */
    SDL_GPUCompareOp compare_op;     /**< The comparison operator used in the stencil test. */
} SDL_GPUStencilOpState;

πŸ¦‹ the fields, one by one πŸ¦‹

  • fail_op β€” the action performed on samples that fail the stencil test. rip to them honestly. πŸ’€
  • pass_op β€” the action performed on samples that pass the depth and stencil tests. main character behavior fr fr, they ate and left no crumbs. πŸ‘‘
  • depth_fail_op β€” the action performed on samples that pass the stencil test but fail the depth test. so close bestie, so close 😭
  • compare_op β€” the comparison operator used in the stencil test. this is the vibe check itself. 🌈
ngl, all four of these are required if you're filling this struct out β€” there's no "just leave it blank" energy here. fill in every field. periodt. πŸ’…

πŸŽ€ AVAILABILITY πŸŽ€

this struct is available since SDL 3.2.0. so if you're on anything older, bestie… she's not there yet. πŸ™ˆ


πŸ‘€ SEE ALSO πŸ‘€


that's the whole page!! go forth and configure your stencil state, you gorgeous genius πŸ§šπŸ’–

πŸ“ this was brought to you by the Simple Directmedia Layer girlies, straight out of SDL 3.4.18. mwah, bye bestie!! πŸ’œ
πŸ“¦ where this page comes from