此函数可用于检索当前用于绘图的 混合方程 。返回的值将为以下常量之一 (默认值为 bm_eq_add):
混合模式方程常数 | ||
---|---|---|
常量 | 描述 | 方程 |
bm_eq_add | Add both together (the default equation). | 来源 + 目的地 |
bm_eq_subtract | Subtract source from destination. | 目的地 - 来源 |
bm_eq_reverse_subtract | Subtract destination from source. | 来源 - 目的地 |
bm_eq_min | Use whichever value is smaller. | 最小 (源,目的地) |
bm_eq_max | Use whichever value is larger. | 最大 (源,目的地) |
重要 当使用 bm_eq_min 或 bm_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,则将其设置为该常量。