we know when a texture has 4 color components,the last one is alpha,but what’s the use of it?which objects will be affected by it?OGL how to deal it in a blend operation?
the alpha channel of the texture works as the alpha for the colors:
textures’ pixels with lower alpha will be more and more transparent. U can use such properties to achive some effects, as the billboarding. (never seen in games those 2d trees always facing the camera? the tree’s texture is square, but the higher part is usually transparent.)
Sorry for my poor didactic propoerties, if u wanna know more google yourself searching billboarding
Shalom! You are just continuing my topic… Yes, that is true - alpha channel is a way to make sprites. Also, if your texture is only RGB you cannot make it transparent - even with similar transparency by whole area. Have you tried to make water? So, RGBA textures are rather cool thing. But not in OpenGL at least not on PC. When you will get real sprite, please reply to my topic - Transparent Textures
Actually, you can have the transparency with RGB bmps. But, you have to convert them to RGBA in the loading of the texture.
Just make a new char array [width by height by 4] then go through each pixel and set the 4th value to 0 if its the right color, then send off that char to glTexImage2D.