Hi Robert, Sorry, my description of the problem sucked! I'll try again.
The FBO post draw callback is definitely being called. Nothing is being displayed on the screen (as everything is being rendered to texture). I call glReadPixels in the post draw callback but there is just zeros in the image data being captured (i.e. The black screen). Do I not need to make a call prior to glReadPixels to tell OpenGL which buffer to read from (i.e. to read from the frame buffer object)? > If you arn't using the latest in CVS, then try this. Very reluctant to upgrade from 1.1 at the moment, unless I find a show stopping bug. Of course this might be just that bug! :-) Should this work in version 1.1? Regards, Andy. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: 23 November 2006 13:40 To: osg users Subject: Re: [osg-users] (no subject) Hi Andy, A camera post drawable should work. I'd recommend putting debugging info into your callback to make sure its being called. In the past I did some bug fixes on the camera callbacks, but I can't recall when. If you arn't using the latest in CVS, then try this. Robert. On 11/23/06, Andy Preece <[EMAIL PROTECTED]> wrote: > > > Hi All, > > Following the osgprerender example I have configured a CameraNode to render > to a frame buffer object. That seems to work fine for me and I can use a > rectangle to display the captured texture fine. > > > > Now what I would like to do is to read back a small part of the frame buffer > object texture into CPU memory. The osgprerender example shows an > implementation where the whole viewport is captured but I can not see a > mechanism for specifying a smaller area of the viewport to capture. > > > > Does anyone know of a way I can achieve this? > > > > I have tried putting a glReadPixels in the CameraNode post draw callback but > this does not work. Do I have to set the glReadBuffer or re-apply the frame > buffer object? > > > > Regards, > > Andy. > ________________________________________________________________________ > This e-mail has been scanned for all viruses by Star.The service is powered > by MessageLabs. > ________________________________________________________________________ > > _______________________________________________ > osg-users mailing list > osg-users@openscenegraph.net > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ > > _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ ________________________________________________________________________ This e-mail has been scanned for all viruses by Star.The service is powered by MessageLabs. ________________________________________________________________________ _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/