PDA

View Full Version : Save the zbuffer



DonDan
12-03-2002, 12:54 AM
How can I dump and save the zbuffer in a ppm file ? I know how to do it for the rendered image but not for depth map.

http://www.opengl.org/discussion_boards/ubb/wink.gif

Asgard
12-03-2002, 01:09 AM
Use glReadPixels with a format parameter of GL_DEPTH_COMPONENT to read out the depth buffer. Then save the result to any file format you want http://www.opengl.org/discussion_boards/ubb/smile.gif

Julien Cayzac
12-03-2002, 02:10 AM
Originally posted by DonDan:
save the zbuffer

Ok, but where's the petition to sign in? http://www.opengl.org/discussion_boards/ubb/biggrin.gif

Julien.