SDL_GPUCompareOp(3type)

πŸ’– SDL_GPUCompareOp β€” a 3type from the SDL3 DATATYPES fam πŸ’–

okay bestie, sit down, hydrate, because today we're talking about SDL_GPUCompareOp and honestly? it's giving "tiny enum, huge responsibilities" ✨

This one specifies a comparison operator for depth, stencil and sampler operations. that's it, that's the whole job, and it does it flawlessly πŸ’…


🌸 NAME 🌸

SDL_GPUCompareOp β€” specifies a comparison operator for depth, stencil and sampler operations. no cap, that's literally the assignment 🫢


✨ SYNOPSIS ✨

pull it in like this, babes:

#include <SDL3/SDL_gpu.h>

typedef enum SDL_GPUCompareOp
{
    SDL_GPU_COMPAREOP_INVALID,
    SDL_GPU_COMPAREOP_NEVER,             /**< The comparison always evaluates false. */
    SDL_GPU_COMPAREOP_LESS,              /**< The comparison evaluates reference < test. */
    SDL_GPU_COMPAREOP_EQUAL,             /**< The comparison evaluates reference == test. */
    SDL_GPU_COMPAREOP_LESS_OR_EQUAL,     /**< The comparison evaluates reference <= test. */
    SDL_GPU_COMPAREOP_GREATER,           /**< The comparison evaluates reference > test. */
    SDL_GPU_COMPAREOP_NOT_EQUAL,         /**< The comparison evaluates reference != test. */
    SDL_GPU_COMPAREOP_GREATER_OR_EQUAL,  /**< The comparison evaluates reference >= test. */
    SDL_GPU_COMPAREOP_ALWAYS             /**< The comparison always evaluates true. */
} SDL_GPUCompareOp;

and here's the cast, one by one, so you know exactly what each vibe is πŸ‘‘

  • SDL_GPU_COMPAREOP_INVALID β€” the "no thoughts, head empty" option. it's the invalid one, the placeholder, the one you should not be shipping, bestie πŸ™ˆ
  • SDL_GPU_COMPAREOP_NEVER β€” the comparison always evaluates false. never. not once. not ever. it said "no" and meant it πŸ’€
  • SDL_GPU_COMPAREOP_LESS β€” the comparison evaluates reference < test. tiny little less-than moment 🌸
  • SDL_GPU_COMPAREOP_EQUAL β€” the comparison evaluates reference == test. twin energy, matching vibes ✨
  • SDL_GPU_COMPAREOP_LESS_OR_EQUAL β€” the comparison evaluates reference <= test. inclusive king/queen/monarch πŸ‘‘
  • SDL_GPU_COMPAREOP_GREATER β€” the comparison evaluates reference > test. big "I'm bigger than you" energy πŸ”₯
  • SDL_GPU_COMPAREOP_NOT_EQUAL β€” the comparison evaluates reference != test. the "we are NOT the same" option πŸ’…
  • SDL_GPU_COMPAREOP_GREATER_OR_EQUAL β€” the comparison evaluates reference >= test. generous AND demanding, we love a range πŸŽ€
  • SDL_GPU_COMPAREOP_ALWAYS β€” the comparison always evaluates true. always. main character energy, never misses, ate and left no crumbs 🌈

πŸ¦‹ AVAILABILITY πŸ¦‹

This enum is available since SDL 3.2.0. so if you're on something older, it's not ghosting you, it literally does not exist yet 😭


πŸŽ€ SEE ALSO πŸŽ€


quick vibe check: this is an enum, so every value here is a real, named constant. don't invent new ones, don't reorder them in your head, just pick the one that matches the comparison you actually mean πŸ’œ

and that's the whole page, bestie!! written with love by the Simple Directmedia Layer girlies, from SDL 3.4.18, and yes this is SDL_GPUCompareOp(3type) signing off β€” go compare something responsibly πŸ“πŸ’–

πŸ“¦ where this page comes from