Any way to temporary disable the far clipping plane?

I need to disable Far Clipping Plane to render some distant points. Is it possible?

Or I have to push the Far Plane with e.g. glFrustum, render those points, and then to restore my old Frustum? I suppose it’s OK to chage the Frustum during the rendering, but I never tried before…

No you cannot disable it.

You can set it pretty far away though, just make sure the near clipping plane is n’t to close to the viewer.


Have a look at , it may prove useful


Hi NiCo, thanx for the hint. Yes, I looked at it, and that might be “it”, but it’s supported only on NVidia HW which is not acceptable.

And when changing Near and Far planes with gluPerspective, Z buffer gets cleared, so it’s not convenient. I’ll render in several passes, grouped by object distances. First those really far away, then the others.

It’s possible to construct a projection matrix with an infinite far plane (you can derive it yourself fairly easily by seeing wha happens to the elements of the “normal” projection matrix when far tends to infinity). If you search for “infinite projection matrix” in google I’m sure you’ll get lots of hits. It’s commonly used for rendering stencil shadow volumes.

Thanx harsman, but that would decrease the Z buffer accuracy, when translating Z coordinates to [0, 1] range. I think two (or more) passes will do better.