可能重复: How to do alpha blend fast? 什么是阿尔法混合2 RGBA(整数)色的最快方法? 作为说明,混合的目标颜色总是不透明的,只有第二种颜色可以具有不同的透明度级别。 我试图找到在C最快的方式,考虑到从混合物中最终得到的颜色必须与没有透明度,完全不透明的(alpha = 0xFF的)
我休闲@Stefan Monov教程this question。一切正常,但我需要使它与我的画笔合作。我需要这样做: // Next, we want a blendfunc that doesn't change the color of any pixels,
// but rather replaces the framebuffer alpha values with values ba