I've found 5349574673 pages on alpha blending and I still can't get the desired result. I'm trying to make gif/png files display properly (WITH transparency/translucency) using opengl.
Here's my initialization bit:
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); //I've seen this on most tutorials
glDisable(GL_DEPTH_TEST); //it's a 2D game
//...loading matrices and so on
I am SURE the images have transparency, and are loaded properly.
glBlendFunc(GL_ONE, GL_ONE); works but I can't tell if it's doing anything on the alpha channel since it would render as black => blending works
glColor4f(1f,1f,1f,0.3f); works fine, I can draw transparent stuff
P.S. I'm using this example http://lwjgl.org/wiki/index.php?title=Space_Invaders_Example_Game for learning
EDIT I used other textures made encoded with GIMP and other texture loaders and it now works fine.
Your blending setup is correct. However for blending to work the texture must contain an alpha channel, properly valued of course. And then the alpha channel data must be preserved by the image loading process. May we see the image loading and texture generation code, please?