I want to display a logo on my OpenGL program. My logo is a black BMP with the logo in white. You know what I mean I hope.
Example : a cross-hair in on a black BMP.

My question is :

How can I do to put the alpha value for black at 1.0 for only displaying my logo in white ?

Thanks in advance.


prompte your bitmap to RGBA, and for each pixel p, set p.alpha=1.0 if p is white, otherwise set to 0.0

well, if you want the WHITE to show through. change over 1.0 and 0.0 if you want the reverse.


Maybe I’m wrong but if the texture is black with a white logo and you just want the logo to see trhu, u can set the glBlendFunc to GL_ONE_MINUS_SRC_COLOR.

It should work without any picture modifications.


glBlendFunc( GL_ONE, GL_ONE );

Gads, yes. I should have thought of that, too. <smacks forhead>