glBlendFunc() with 32-bit RGBA textures

Posted by oldSkool on Stack Overflow See other posts from Stack Overflow or by oldSkool
Published on 2010-12-13T14:42:26Z Indexed on 2012/10/06 9:38 UTC
Read the original article Hit count: 177

I have a texture that is semi-transparent with varying opacity at different locations. I have the main texture bitmap, and a mask bitmap. When the program executes, the alpha values from the mask bitmap are loaded into the alpha values of the main texture bitmap. The areas that I want to be transparent have a value of 255 alpha, and the areas that I want to remain totally opaque have values of 0 alpha. There are in-between values also for mid-transparency.

I have tried all manner of glBlendFunc() settings, but it is either completely invisible or it acts on the RGB colors of the source texture.

Any help out there?

© Stack Overflow or respective owner

Related posts about opengl

Related posts about texture