gpu_get_blendequation

This function can be used to retrieve the current blend equation being used for drawing. The returned value will be one of the following constants (the default value is bm_eq_add):

Blend Mode Equation Constant
ConstantDescriptionEquation
bm_eq_addAdd both together (the default equation).source + destination
bm_eq_subtractSubtract source from destination.destination - source
bm_eq_reverse_subtractSubtract destination from source.source - destination
bm_eq_minUse whichever value is smaller.min(source, destination)
bm_eq_maxUse whichever value is larger.max(source, destination)

IMPORTANT Blend factors are not applied when bm_eq_min or bm_eq_max is used as the blend equation, which is effectively the same as using bm_one as the factors.

 

Syntax:

gpu_get_blendequation();

 

Returns:

Blend Mode Equation Constant (see above for constants)

 

Example:

if (gpu_get_blendequation() != bm_eq_add)
{
    gpu_set_blendequation(bm_eq_add);
}

The above code gets the current blend equation and if it is not bm_eq_add it is set to that constant.