Wiki Page Content

Differences between revisions 1 and 2
Revision 1 as of 2017-09-27 10:08:23
Size: 1765
Editor: ChliHug
Comment: Created page with the content from the header file.
Revision 2 as of 2017-09-27 15:57:49
Size: 1766
Editor: ChliHug
Comment: Changed category from Categoryvideo to CategoryRender, as this only works with renderers currently.
Deletions are marked like this. Additions are marked like this.
Line 46: Line 46:
[[CategoryEnum]], [[CategoryVideo]] [[CategoryEnum]], [[CategoryRender]]

DRAFT

SDL_BlendFactor

An enumeration of blend factors used when creating a custom blend mode with SDL_ComposeCustomBlendMode().

Values

SDL_BLENDFACTOR_ZERO

0, 0, 0, 0

SDL_BLENDFACTOR_ONE

1, 1, 1, 1

SDL_BLENDFACTOR_SRC_COLOR

srcR, srcG, srcB, srcA

SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR

1-srcR, 1-srcG, 1-srcB, 1-srcA

SDL_BLENDFACTOR_SRC_ALPHA

srcA, srcA, srcA, srcA

SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA

1-srcA, 1-srcA, 1-srcA, 1-srcA

SDL_BLENDFACTOR_DST_COLOR

dstR, dstG, dstB, dstA

SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR

1-dstR, 1-dstG, 1-dstB, 1-dstA

SDL_BLENDFACTOR_DST_ALPHA

dstA, dstA, dstA, dstA

SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA

1-dstA, 1-dstA, 1-dstA, 1-dstA

Code Examples

You can add your code example here

Remarks

The blend factors are multiplied with the pixels from a drawing operation (src) and the pixels from the render target (dst) before the blend operation. The comma-separated factors listed above are always applied in the component order red, green, blue, and alpha.

Some renderers may not support all factors. See SDL_ComposeCustomBlendMode() for a list of what the current renderers support.

Version

This enumeration is available since SDL 2.0.6.


CategoryEnum, CategoryRender

None: SDL_BlendFactor (last edited 2017-09-27 15:57:49 by ChliHug)

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