constructive solid geometry

in the article on this website, there is stated, that problems with depth buffer arise during rendering of constructive geometry - for example the parts of the surface that is not in color buffer may be stored in depth buffer… and it’s very very bad :slight_smile:
can anyone point me some ways out?
i thought of some kind of storing the depth buffer, and restoring it afterwards (using glReadPixels and glDrawPixels) but it’s tooo slow…
any ideas? i believe it can be done :slight_smile:

The CSG rendering library OpenCSG circumvents problems of false depth buffer values by calculating each CSG expression in a pbuffer and transfering only the really visible areas into the main frame buffer. In this way, CSG objects and other 3D geometry can be freely mixed. This technique is explained further in this paper .

By the way, I’m eagerly waiting for drivers with support for FBO to optimize this technique even more. Getting rid of the pbuffer’s context-switch will be very handy here…