Hi Harash, What will be need is a custom Operation that you insert into the operations queue in the viewer's GraphicsWindows. The tricky bit right now is the GraphicsContext::add(Operation*) method just adds to the end of the list, what you want is add in front of the swap buffers operation. To make this straight forward we'll need to add some extra accessors to into GraphicsContext.
It might also make sense to have the ability to add graphics Operations via Viewer and CompositeViewer that are pre or post draws. This could hide some of the complexity of tracking down GraphicsWindow's and inserting the operation in the right place. Oh, the other way to do this would be to use a PostDrawCallback on each osg::Camera. This would just snap the image for that particular camera though, not the whole window. Now if the camera covers the whole window then you are fine and its really straight forward. Robert. On 5/17/07, Harash Sharma <[EMAIL PROTECTED]> wrote:
Hi Robert, The application I am developing, I need to take a screen shot every cycle. Earlier using osgUtil::SceneView, I used to create an Image object and grab the frame buffer. osg::ref_ptr<osg::Image> Img = new osg::Image; Img->readPixels(....); Now after I have modified the project to osgViewer::CompositeViewer, I am not able to read the frame buffer. Is it some mistake on my part in some linking etc. related issues or is the support withdrawn. In either case can you please guide me to the simplest method that can be adopted to grab the image from the framebuffer memory, Thanks in advance( I know you will help me taking a clue from the past ;-)). Regards Harash ________________________________ TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. _______________________________________________ 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/
