Alpha blending and UIView background color

When I draw semitransparent textures with OpenGL, it looks like that I get them blended with EAGLView backgroundColor.

((EAGLView*)my_view).backgroundColor = [UIColor redColor];

opaque property is set to YES.

Now that image looks red, when I change to black it turns to gray(blended with black), to white it becomes white (even semitransparent black). What can it be?

my blending function setting is: src BFP_SRC_ALPHA, dest ONE_MINUS_SRC_ALPHA I tried also(possibly something like premultiplied alpha): src ONE dest GL_ONE_MINUS_SRC_ALPHA - it gives good result, but I get problems when drawing semitransparent quad(not texture).


问题出现在预乘alpha使用src ONE dest GL_ONE_MINUS_SRC_ALPHA,并且args必须与预乘alpha也glColor4f(r * a,g * a,b * a,a)

链接地址: http://www.djcxy.com/p/31838.html

上一篇: 在混合模式下将Open GL中的两个半透明未预乘的纹理结合起来?

下一篇: Alpha混合和UIView背景颜色