Name
sdl.SetRenderDrawBlendMode -- set draw blend mode
Synopsis
sdl.SetRenderDrawBlendMode(display, blendmode)
Function
Use this function to set the blend mode used for drawing operations (fill and line).

#SDL_BLENDMODE_NONE
no blending

 
dstRGBA = srcRGBA

#SDL_BLENDMODE_BLEND
alpha blending

 
dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
dstA = srcA + (dstA * (1-srcA))

#SDL_BLENDMODE_ADD
additive blending

 
dstRGB = (srcRGB * srcA) + dstRGB
dstA = dstA

#SDL_BLENDMODE_MOD
color modulate

 
dstRGB = srcRGB * dstRGB
dstA = dstA

Inputs
display
identifier of display whose renderer should be used
blendmode
one of the blend modes from above

Show TOC