Particle Woes

My Particle system has a problem. If Depth testing is on then the particles block each other out for obvious reasons. When is is off it is ok but then you can see the particles through walls and everything for that matter. What do i have to do so they dont block each other out and so you cant see them through walls?

Draw all opaque geometry 1st.

Turn Depth testing on
Turn Z writing off

Draw all your particles.

Ideally all your particle should be depth sorted, but not everyone does this.

If they are drawn as Addative blends, then you dont need to sort.


[This message has been edited by Nutty (edited 01-19-2002).]

Thanks… I know how to turn depth testing on/off (not kinda hard ;-p ), but how do i turn z writing off?? BTW, they are drawn using glBlendFunc(GL_SRC_ALPHA, GL_ONE);

[This message has been edited by MrShoe (edited 01-19-2002).]

turns Z-writing off
turns it back on

Sweet, thanks!