testing the z buffer


this is not a complete OpenGL question, but blend with some other 3D technics. thanx to reply.

i would like to know if the z buffer test of opengl is heavy. if it is, how far it is ? why opengl provides such functionnalities, but why any 3D engine develop alternative ways to do so ? (as BSP, octrees…).

And do you advise to develop such trees ?

reading left and right, it seems obliged to use these stuffs. But, by this way, the CPU of the computer is more sollicited. so, maybe you’ll need a more powerful cpu.
Does that technic is better for the graphic card that stands the T&L ? in some cases; it will permit to let the card more freedom to manage all… i may be wrong or blending myself.

Depth test is very fast. Octrees etc. are used for frustum culling. Roughly sorting the geometry from front to back can speed up things since more geomerty can be rejected instead of being drawn.


thanx Lev.

So, using these trees in order to do the depth buffer instead of the opengl provided tests is an aberration ? or does it permit to give only the right objects to the rendering ? i think the second is quite better.
Does someone could advise to not enable the opengl depth test ?

It’s best to do both.

BSP trees (or some other culling technique) primarily reduces geometry load, and also saves some fillrate.

The depth test allows you to relax your sorting algos, so that they can be made faster at the expense of some overdraw. It also removes the need for strict software clipping. Which is a good thing.