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 | ||
---|---|---|
Constant | Description | Equation |
bm_eq_add | Add both together (the default equation). | source + destination |
bm_eq_subtract | Subtract source from destination. | destination - source |
bm_eq_reverse_subtract | Subtract destination from source. | source - destination |
bm_eq_min | Use whichever value is smaller. | min(source, destination) |
bm_eq_max | Use 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.
gpu_get_blendequation();
Blend Mode Equation Constant (see above for constants)
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.