View Full Version : no more alpha channel...

Gemelli David
06-20-2002, 05:20 AM
Hi !
I'm loading a 32 bits tga into a texture. I am sure the tga contains the alpha channel with no null value in some parts of it. glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, Picture.GetW(), Picture.GetH(),0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, Picture.GetData());

but, there is no alpha in the opengl texture...when I'm using blend or alpha test, I get the same results as if the alpha channel was 0 everywhere...

what did I miss ? thanks.

06-20-2002, 07:41 AM
Does your PixelFormat has AlphaBits != 0 ?

06-20-2002, 08:07 AM
Did you enable alpha blending ( stupid question I know but sometimes accidently you could in code disable blending ).
And is the alpha channel the fourth bit in pixel ?

Gemelli David
06-20-2002, 09:57 PM
Yes, that was that, as I detected alpha channel in my texture, I was using a glColor3f(1, 1, 1, 0)...This was a very stupid idea...It's been 2 days I was looking for my bug...


David (not very clever this time...)