Wiki Page Content

Differences between revisions 14 and 15
Revision 14 as of 2011-07-02 00:47:33
Size: 954
Editor: SheenaSmith
Comment: notes for me
Revision 15 as of 2013-08-08 20:57:51
Size: 1168
Editor: Sam Lantinga
Comment: Updated blending formulas
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
||SDL_BLENDMODE_BLEND||dst = (src * A) + (dst * (1-A))||
||SDL_BLENDMODE_ADD||dst = (src * A) + dst||
||SDL_BLENDMODE_MOD||dst = src * dst||
|| ||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||

SDL_BlendMode

An enumeration of blend modes used in SDL_RenderCopy() and drawing operations.

Values

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

Code Examples

You can add your code example here

Remarks

You can add useful comments here


CategoryEnum, CategoryVideo

None: SDL_BlendMode (last edited 2013-08-08 20:57:51 by Sam Lantinga)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit