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 evaluatesreference < test. tiny little less-than moment πΈSDL_GPU_COMPAREOP_EQUALβ the comparison evaluatesreference == test. twin energy, matching vibes β¨SDL_GPU_COMPAREOP_LESS_OR_EQUALβ the comparison evaluatesreference <= test. inclusive king/queen/monarch πSDL_GPU_COMPAREOP_GREATERβ the comparison evaluatesreference > test. big "I'm bigger than you" energy π₯SDL_GPU_COMPAREOP_NOT_EQUALβ the comparison evaluatesreference != test. the "we are NOT the same" option πSDL_GPU_COMPAREOP_GREATER_OR_EQUALβ the comparison evaluatesreference >= 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 π
SDL_CreateGPUGraphicsPipeline(3)β the function that actually puts these comparison ops to work. iykyk π§
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
- 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