
Alpha Channel & Multitexture
I''m loading tga''s with alpha channel
(gluBuild2DMipmaps(GL_TEXTURE_2D, 4, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data)
and I want to use the Alpha Channel with multitexturing. I''ve tried different parameters (glTexEnvf...), but all i got was that the color white got transparent.

Well, don''t know why only the color white is transparent.
But every rgb pixel is transparent when the responding a (alpha) pixel is 0.
So i would say you have to check your alpha channel
But every rgb pixel is transparent when the responding a (alpha) pixel is 0.
So i would say you have to check your alpha channel

A little example:
You have got a texture with a flame and a black background.
So if you want that the color black is transparent then must
every black pixel have to had 0 (transparent) on the alpha channel and the rest 255 (visible).
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
Drawing
Sorry for my english, i know that it is not the best
You have got a texture with a flame and a black background.
So if you want that the color black is transparent then must
every black pixel have to had 0 (transparent) on the alpha channel and the rest 255 (visible).
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
Drawing
Sorry for my english, i know that it is not the best

Hi,
On my site, I''ve a example for using multi-texturing and another for alpha chanel for TGA.
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
On my site, I''ve a example for using multi-texturing and another for alpha chanel for TGA.
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement