I found 5349574673 pages about alpha blending and I still canโt get the desired result. I am trying to correctly display gif / png files (with transparency / transparency) using opengl.
Here is my initialization bit:
glEnable(GL_TEXTURE_2D); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
I am SURE that images have transparency and load correctly.
glBlendFunc (GL_ONE, GL_ONE); works, but I canโt say if it does anything on the alpha channel, since it will look like black => mixing works
glColor4f (1f, 1f, 1f, 0.3f); works fine, i can draw transparent things
PS I am using this example http://lwjgl.org/wiki/index.php?title=Space_Invaders_Example_Game for training
EDIT I used other textures encoded using GIMP and other texture loaders, and now it works great.
source share