Supported Browsers Home   
MGL_setBackMode Previous   
MGL_setBlueCodeIndex Next   
External Functions Up   

MGL_setBlendFunc

Sets the current source and destination pixel blending function.

Declaration

void MGLAPI MGL_setBlendFunc(
    int srcBlendFunc,
    int dstBlendFunc)

Prototype In

mgraph.h

Parameters

srcBlendFunc

New source blending function, defined by MGL_blendFuncType.

dstBlendFunc

New destination blending function, defined by MGL_blendFuncType.

 

Description

This function sets the current source and destination pixel blending function used to enable pixel blending in the MGL. By default pixel blending is disabled, and the blending function is set to MGL_BLEND_NONE. Essentially the source and destination blend function define how to combine the source and destination pixel colors together to get the resulting destination color during rendering. For a more detailed description of the blending functions, see the documentation for the MGL_blendFuncType enumeration.

Note:    Blending is only enabled when both the source and destination blending functions are set to values other than MGL_BLEND_NONE.

Note:    Blending and logical write modes are not supported at the same time. When you enable blending modes, the logical write mode set by MGL_setWriteMode is ignored.

Note:    No hardware currently supports arbitrary pixel blending operations for 2D operations, so enabling blending modes causes the MGL to run entirely in software. Keep this in mind since if performance is important!

See Also

MGL_getBlendFunc, MGL_setAlphaValue

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com