Module: SDL2::BlendMode
- Defined in:
- video.c,
video.c
Overview
Constants represent blend mode for Renderer.copy and drawing operations.
You can change the blending mode using Renderer#draw_blend_mode= and Texture#blend_mode=.
In the backend of SDL, opengl or direct3d blending mechanism is used for blending operations.
Constant Summary
- NONE =
no blending (dstRGBA = srcRGBA)
INT2FIX(SDL_BLENDMODE_NONE)
- BLEND =
alpha blending (dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA), dstA = srcA + (dstA * (1-srcA)))
INT2FIX(SDL_BLENDMODE_BLEND)
- ADD =
additive blending (dstRGB = (srcRGB * srcA) + dstRGB, dstA = dstA)
INT2FIX(SDL_BLENDMODE_ADD)
- MOD =
color modulate (multiplicative) (dstRGB = srcRGB * dstRGB, dstA = dstA)
INT2FIX(SDL_BLENDMODE_MOD)