RELIC! GORK! Help Me damn You!

I place partailly transparent trees on my terrain with the mouse, I had to Disable the depth test while they are draw or the Transparency doesnt work properly, the problem I have now is that tree’s in the back ground show through tree’s in the foreground, I know this is due to the drawing order.

DO I have to sort my tree’s back to front?

and if so How do I do that efficiently!

Well, i’m not Relic nor gork but i can answer the fisrt question : if you use som color-key transparency, then you can use the AlphaFunc instead using blending. If you use blending then YES, you will always need to sort your trees by depth for having a good transparency effect. But maybe AlphaFunc can do what you want : it discards pixels which have an Alpha color equal (or greater, or lower…) to a ref. So the parts of trees tree that are not to be drawn will not be rendered, even in the depth buffer

Antoche

You da man!

thanx!