PDA

View Full Version : Reading in Z-buffer



uhef
09-27-2004, 09:12 PM
Hi.

I was wondering whether it is possible to read in z-buffer of the current framebuffer using GL ES? From the specs I gathered that glReadPixels support only RGBA read and not the DEPTH_COMPONENT read that is required here. If it is not possible with GL ES can the same thing be done using egl? Any help on the subject is highly appreciated.

flame
10-01-2004, 10:40 PM
Hi.

The spec doesn't allow reading of depth buffer for a good reason. For some HW implementations providing readback capability from depth buffer is ever worse than reading back the frame buffer.

It can be provided as a vendor-specific extension though (e.g., for SW only rasterizers).

--jani;