Zhang's algorithm maintains the depth estimation buffer using simplified software scan conversion and uses the OpenGL pipeline to optimize the computation of the occlusion maps. All testing is performed on the the host, which has the advantage that the testing can be performed asynchronously with the drawing operations and they test results can be computed with very low latency. Another possibility is to maintain the occlusion buffer in the hardware accelerator itself. In order to be useful, there must be a method for testing the screen-space bounding rectangle against the map and efficiently return the result to the application.
The OpenGL depth buffer can be used to do this with some additional extensions. Occluders are selected using the heuristics described above and rendered to the framebuffer as regular geometry. Following this, bounding geometry for candidate objects are rendered and tested against the depth buffer without changing the contents of the color buffer or depth buffer. The result of the depth test is then returned to the application, preferably reduced to a single value rather than the results of the depth test for every fragment generated. The results of the tests are used to determine whether to draw the candidate geometry or discard it. Extensions for performing the occlusion test and returning the result have been proposed and implemented by several hardware vendors [77,13] and more implementations are likely in the future.