In my code I am loading textures from file in RGBA format. Now I was wondering how I could use the A element to set the transparency of the texel. I have tried using GL_Blend in glTexEnvf, but the image looks all screwed up then( I think it’s being inverted ), though any of the other functions works fine( but doesn’t do transparency ). How should I get this to work properly?
glBlendFunc( GL_SRC_ALPGA,GL_ONE_MINUS_SRC_ALPHA)
will blending the texture with the frame buffer depending on the textures pixels alpha value. ie 1 for totally replace the colour in the framebuffer and 0 for leave it the same. between 0-1 for a mix of the 2