Ok. Thanks for the reply. Followup question: Is there an automagic way to determine what this last camera is or do I need to keep track of that myself?
Is it reasonable to attach a camera to the scenegraph set as the "last" camera just for capture purposes? I wouldn't think there would be much overhead incurred, but never hurts to ask. On Nov 23, 2007 12:46 AM, Berg, Michael <[EMAIL PROTECTED]> wrote: > > 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 > > osg-users@lists.openscenegraph.org > > 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 > 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