View Full Version : Problems with Depth Buffer

09-16-2003, 04:28 PM
I'm drawing a large amount of Spheres on the screen, and when I draw them in my standard manner, (Display list for each type, then calls for each of the spheres) everything works great. However, when I cap the spheres for slicing I group each type into a display list, cap that, and then call those display lists for each type. Unfortunately, I require clearing the depth buffer for each of the draws in order to prevent the stencil buffer from drawing the clipped spheres. ***Is there a definitive way to save and load the depth buffer*** so that I can only save the depths that are actually drawn?

09-16-2003, 11:07 PM


09-16-2003, 11:20 PM
You might also want to look at
WGL_ARB_buffer_region (http://oss.sgi.com/projects/ogl-sample/registry/ARB/wgl_buffer_region.txt) if you're on a windows platform.

With it you can save/restore certain parts of a buffer(color/depth/stencil) into video or system memory.