Drawing a 3-D grid

I want to draw a 3-D grid composed of cubes to improve the perception of perspective and distance.

I tried to create a grid using large planes drawn as GL_QUADS. The problem with this method is that the planes are not always clipped properly by the frustum -they are often clipped irregularly in a manner that causes portions of plane not to be drawn.

Why is the clipping inconsistent?
What better way is there to draw a 3D grid?

does your grid extend in two or three dimensions?

about the clipping… i never had problems with that. probably what you see are the effects of a depth buffer not well set.

try to increase the near clipping plane when you call gluPerspective() (or the function you are using)

also, try to decrease the far clipping plane.

Dolo//\ightY