SDL_SetGPUBlendConstants(3)
π SDL_SetGPUBlendConstants β NAME, bestie π
okay so this page is SDL_SetGPUBlendConstants(3), part of the SDL3 functions fam, and it does exactly one iconic thing: it sets the current blend constants on a command buffer. that's it. that's the whole job. she's focused, she's simple, she ate. π
β¨ SYNOPSIS β¨
first you gotta bring her into the group chat:
#include <SDL3/SDL_gpu.h>
then the actual call, verbatim, no cap:
void SDL_SetGPUBlendConstants(
SDL_GPURenderPass *render_pass,
SDL_FColor blend_constants);
notice the void? she returns nothing. no notes, no receipts, no return value. she just does the thing and moves on. main character energy fr fr. π
πΈ FUNCTION PARAMETERS πΈ
two args, both important, let's get into it:
render_passβ a render pass handle. this is the render pass you're working inside, the whole venue for the vibe. lowkey important.blend_constantsβ the blend constant color. it's anSDL_FColor, so it's the color the blending math is gonna reference. that's the constant, bestie.
that's the whole parameter list. short, sweet, slay.
π¦ AVAILABILITY π¦
she's been around since SDL 3.2.0. if your SDL is older than that, no SDL_SetGPUBlendConstants for you, sorry bestie π
π SEE ALSO π
these are the two blend factors that actually use the constants you just set, so like, they're the whole reason this function exists. obsessed:
SDL_GPU_BLENDFACTOR_CONSTANT_COLOR(3)SDL_GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR(3)
if you're setting blend constants, you're almost definitely using one of these two. iykyk. π
and that's the whole page, bestie β¨ this was SDL_SetGPUBlendConstants(3), brought to you by Simple Directmedia Layer, version SDL 3.4.18 β go forth and blend, you absolute icon π«Άπ
π¦ 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