I'll let the code to the talking:

http://www.andesengineering.com/misc/depth_fbo.zip

http://www.andesengineering.com/misc/depth_pbuffer.zip

These are two examples that use both an FBO and a pbuffer to read back depth buffer values in a Producer::Camera postDrawCallback.  They are both a "single shot" snapshot of the depth buffer saved to an .rgb image.  I've included the PBuffer example as it is a lot less code.

-don




On 11/6/06, Robert Osfield <[EMAIL PROTECTED]> wrote:
On 11/6/06, Oliver Kutter <[EMAIL PROTECTED]> wrote:
>  I want to read back a texture and the z-buffer values. I want to do several
> others things, which could be done manually in an easy way, but with osg it
> seems not to be so easy.

Have you tried a CameraNode post draw callback?

>  What is the difference between the osg::CameraNode and the
> Producer::Camera? If there is no such big difference, I could use a
> Producer::Camera and do a postDrawCallback.

I'll let Don do his promotional bit for Producer::Camera.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to