gpu_get_blendequation

此函数可用于检索当前用于绘图的 混合方程 。返回的值将为以下常量之一 (默认值为 bm_eq_add):

混合模式方程常数
常量描述方程
bm_eq_addAdd both together (the default equation).来源 + 目的地
bm_eq_subtractSubtract source from destination.目的地 - 来源
bm_eq_reverse_subtractSubtract destination from source.来源 - 目的地
bm_eq_minUse whichever value is smaller.最小 (源,目的地)
bm_eq_maxUse whichever value is larger.最大 (源,目的地)

重要 当使用 bm_eq_minbm_eq_max 作为混合方程时,不会应用 混合因子 ,这与使用 bm_one 作为混合方程是相同的因子。

 

语法:

gpu_get_blendequation();

 

返回:

混合模式方程常数 (see above for constants)

 

例子:

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

上述代码获取当前混合方程,如果它不是 bm_eq_add,则将其设置为该常量。