Depth Testing doesn't work with GL_LINES, but it works with GL_TRIANGLES

I got a little problem in my 3D app.

I implemented a grid system yesterday, and then it suprised me that depth testing doesn’t work with GL_LINES, so I always see the grid system above all objects.

What could possibly be wrong?

Thanks!

//wiggo

Either you deactivated the depth buffer test, either your driver is buggy…

What card and driver are you using ?

Regards.

Eric

Make sure you are not clearing the depth buffer between rendering the scene and rendering the grid .

I got an ATI 3D rago pro.

Hello

Maybe the problem is that the ATI Rage Pro draws lines in software mode and tries to read from a software z-buffer while the rest of the depth information is in the hardware z-buffer. I played with it sometime ago and I had the problem too. Maybe it is solved in newer drivers…

I just spoke with the driver folks here, as far as they know this should work just fine. What driver version and OS are you working with?

dave