Who knows some instruction for transparent texture mapping?

Who knows some instruction for transparent texture mapping?
I want to know some instruction for transparent texture mapping. I tried some bland command(glBlendFunc()) but it does not work so good.
For eg., You have two walls: A and B, both are transparent, you draw the A first and B second using glBlendFunc(), and the A is NOT transparent

So, I need some REAL transparent command.
Thank you very much

Originally posted by warrener:
[b]Who knows some instruction for transparent texture mapping?
I want to know some instruction for transparent texture mapping. I tried some bland command(glBlendFunc()) but it does not work so good.
For eg., You have two walls: A and B, both are transparent, you draw the A first and B second using glBlendFunc(), and the A is NOT transparent

So, I need some REAL transparent command.
Thank you very much[/b]

Well, this may not be really an advanced question, but anyways…

In order to correctly display multiple transparent objects with overlap, you should draw them in a depth-sorted order (back to front).
The transparent objects should be drawn AFTER all opaque objects have been drawn unless you can depth-sort these too.

There are techniques that allow correct rendering of transparent objects without performing the depth-sort, but these are harder and may involve using frame-buffers with alpha channels (not always available and not always high-performant).

HTH

Jean-Marc.

ok thats easy:
1st you do something like:
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

then you draw your walls, but look at the command leading the drawing
glColor4f(1,1,1,0.75f);
//draw wall1
glColor4f(1,1,1,0.25f);
//draw wall2

i think depth isnd the problem (sorted from back to front) else disable depth writes (not tests !):
glDepthMask(GL_FALSE);

now you want to know why the color-command affects the objects ?? because each pixel is multiplied with this color-value ! and in this example you apply an alpha value of 0.75f or 0.25f which produces transparency (alpha 1.0f is solid )

Hope this help you. http://nate.scuzzy.net/gltut/colorkey.zip
Goodluck.