transparency problem with textured trees...

I’m having a problem with drawing textured trees in my 3d engine. I’m drawing them using two perpendicular quads,and I have the texture_env for the tree texture set to GL_MODULATE.Everything works just fine,with one exception—Sometimes one part of the tree will overlap another part,and erase bits of the tree. I know this is a vague explanation,so I have provided a screenshot: http://www.geocities.com/delsydsoftware/problem.jpg

This problem only happens from some angles.I can provide source if you need it. I’m guessing that it has something to do with the drawing order,but I might be wrong…

After a few tries, it finally let me see it.

To me it looks like you didn’t disable depth writes when drawing the tree quads.

You might also want to try http://www.geocities.com/delsydsoftware/problem.html

For some reason,this seems to work better…

It seems to be either what DFrey says or you didn’t set yyour alpha-blending function or alpha values correct

Chris

Right, either disabling depth writes or enabling alpha testing will fix that problem.