View Full Version : Depth Test Problems

08-14-2003, 01:42 PM
Hey, here's my problem. I have my engine set up and for the effects in the game I use a particle effect. To make the particle effect look good I have to turn off the depth test and turn on blending and such. The problem is, once I turn off the depth test you can see the particles through walls and such because it's drawing no matter what. Is there anyway I can just turn off the depth test in relation to the other particles but keep on the test in relation to other polygons. In other words, keep the particle effect look but not be able to see it through all the walls. Thanks ahead of time.

08-14-2003, 01:45 PM
use this:


[This message has been edited by AdrianD (edited 08-14-2003).]

08-14-2003, 01:49 PM
It think it's better to use



08-14-2003, 02:08 PM
Originally posted by JanHH:
It think it's better to use


?That's the same. GL_FALSE is 0 (on sane machines anyway).
Note that the glDepthMask description says "non-zero" stuff will allow depth writes, it doesn't say "GL_TRUE" or something. So it may even be more correct to use 0 and 1, but that's really highly theoretical.

08-14-2003, 02:34 PM
Thanks guys, works perfectly