#include <revolution/gx.h>
void GXSetBlendMode(
GXBlendMode type,
GXBlendFactor src_factor,
GXBlendFactor dst_factor,
GXLogicOp op );
| type | Blend mode. Accepted values are:
|
||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| src_factor | Input coefficient. The pixel color created by the graphics processor is multiplied by this coefficient. Acceptable values are as follows:
GX_BM_BLEND. |
||||||||||||||||||||||||||||||||||
| dst_factor | Output coefficient. The current frame buffer pixel color is multiplied by this coefficient. Acceptable values are as follows:
GX_BM_BLEND. |
||||||||||||||||||||||||||||||||||
| op | Blend processing. The acceptable values and logical operations are as follows:
GX_BM_LOGIC. |
None.
This function determines how the source image, generated by the graphics processor, is blended with the embedded frame buffer (EFB). Be aware that you must call the GXSetColorUpdate function to update colors. When type is set to GX_BM_NONE, the source data is written directly to the EFB. When type is set to GX_BM_BLEND, the source and EFB pixels are blended using the following formula:
dst_pix_clr = src_pix_clr * src_factor + dst_pix_clr * dst_factorGX_BL_DSTALPHA and GX_BL_INVDSTALPHA can be used only when the EFB is set to the GX_PF_RGBA6_Z24 pixel format (see the GXSetPixelFmt function). If the pixel format is GX_PF_RGBA6_Z24, then src_factor and dst_factor are also applied to the alpha channel. To write the alpha channel to the EFB you must call the GXSetAlphaUpdate function.
When type is set to GX_BM_LOGIC, the source and EFB pixels are blended using logical bitwise operations. You cannot use both blending and logical operations at the same time.
GXSetPixelFmt, GXSetZMode, GXSetColorUpdate, GXSetAlphaUpdate
2006/03/01 Initial version.
CONFIDENTIAL