Transparent Textures

Hello all,

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?


Reb Crush

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


On my site :

“Download” section, I’ve a little example who display a tree using the alpha chanel.

Somehow it does work now with GL_REPLACE… Hmmmm, strange.

Well, C does that more often =)

Anyway, thanks!