sherman wilcox wrote: > I want to capture my OSG screen and dump it to a jpeg or png file. My > understanding is to attach a callback to the main osgViewer camera and > perform a osg::Image::readPixels(...) from within the callback. That > works in the simple case. But, if I have a basic HUD that is itself a > camera alongside other nodes in the scenegraph, then I never see the > HUD in my osg::Image::readPixels call. That would make sense since my > callback is operating on the main camera and not my child node > camera....but leaves the question of how do I perform a "complete" > screen capture on a graph with multiple cameras? > > Is there an example I missed? > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Sherman, I recently ran into the same problem on this list. Robert Osfield responded with some comments on how it might one-day be done more cleanly, but that "Until these methods are added, you'll need to make do with a post draw callback on the last camera to be drawn." If your HUD is the last camera drawn, set the post draw callback on your HUD camera, and it will be a complete screen capture. - Michael _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

