I'm not sure why the code you posted doesn't work. When I want to read the screen (color, depth, whatever), I use a post draw callback attached to the Camera. This should work whether your framebuffer is a window or an FBO.
Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -----Original Message----- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Johannes Leidheiser Sent: Thursday, April 30, 2009 3:30 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] render depth buffer to image for one time Hi Paul, you are right, I only used that for testing. But also with GL_DEPTH_COMPONENT it doesn't work. In my experience the readPixel command doesn't work for of screen rendering?! I would prefer the version with the variable depth which is attached to the camera. In my first post I forgot to say that I still use version 2.6 of osg. Regards, jojo ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=11149#11149 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org