From bf501ab2d4e34d009e03ece6b9205a1f6af87392 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 15 Jul 2024 14:46:56 -0700 Subject: [PATCH] Made the SDL_BlendMode values wiki-friendly --- include/SDL3/SDL_blendmode.h | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/include/SDL3/SDL_blendmode.h b/include/SDL3/SDL_blendmode.h index 9f28ae42c9..f5af3dd3f8 100644 --- a/include/SDL3/SDL_blendmode.h +++ b/include/SDL3/SDL_blendmode.h @@ -51,25 +51,13 @@ extern "C" { */ typedef Uint32 SDL_BlendMode; -#define SDL_BLENDMODE_NONE 0x00000000u /**< no blending - dstRGBA = srcRGBA */ -#define SDL_BLENDMODE_BLEND 0x00000001u /**< alpha blending - dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)) - dstA = srcA + (dstA * (1-srcA)) */ -#define SDL_BLENDMODE_BLEND_PREMULTIPLIED 0x00000010u /**< pre-multiplied alpha blending - dstRGBA = srcRGBA + (dstRGBA * (1-srcA)) */ -#define SDL_BLENDMODE_ADD 0x00000002u /**< additive blending - dstRGB = (srcRGB * srcA) + dstRGB - dstA = dstA */ -#define SDL_BLENDMODE_ADD_PREMULTIPLIED 0x00000020u /**< pre-multiplied additive blending - dstRGB = srcRGB + dstRGB - dstA = dstA */ -#define SDL_BLENDMODE_MOD 0x00000004u /**< color modulate - dstRGB = srcRGB * dstRGB - dstA = dstA */ -#define SDL_BLENDMODE_MUL 0x00000008u /**< color multiply - dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)) - dstA = dstA */ +#define SDL_BLENDMODE_NONE 0x00000000u /**< no blending: dstRGBA = srcRGBA */ +#define SDL_BLENDMODE_BLEND 0x00000001u /**< alpha blending: dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)), dstA = srcA + (dstA * (1-srcA)) */ +#define SDL_BLENDMODE_BLEND_PREMULTIPLIED 0x00000010u /**< pre-multiplied alpha blending: dstRGBA = srcRGBA + (dstRGBA * (1-srcA)) */ +#define SDL_BLENDMODE_ADD 0x00000002u /**< additive blending: dstRGB = (srcRGB * srcA) + dstRGB, dstA = dstA */ +#define SDL_BLENDMODE_ADD_PREMULTIPLIED 0x00000020u /**< pre-multiplied additive blending: dstRGB = srcRGB + dstRGB, dstA = dstA */ +#define SDL_BLENDMODE_MOD 0x00000004u /**< color modulate: dstRGB = srcRGB * dstRGB, dstA = dstA */ +#define SDL_BLENDMODE_MUL 0x00000008u /**< color multiply: dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)), dstA = dstA */ #define SDL_BLENDMODE_INVALID 0x7FFFFFFFu /**