Re: [osg-users] Rendering to a image file (taking a screenshot)

2008-05-15 Thread Robert Osfield
Hi J-S, On Wed, May 14, 2008 at 8:27 PM, Jean-Sébastien Guay [EMAIL PROTECTED] wrote: I'll do it, I'll do it! :-) ;-) (seriously, it's one of the things I have to do in the next few days for our own software, and I was planning on making it generic enough to factor out) A few questions

Re: [osg-users] Rendering to a image file (taking a screenshot)

2008-05-15 Thread Jean-Sébastien Guay
Hello Robert, Ideally it'd be configurable - so you can capture particular camera's, through to all cameras. There is also the aspect of capturing the window contents rather than just individual cameras. OK, interesting. I'll think about this and try some possible solutions. The filename

[osg-users] Rendering to a image file (taking a screenshot)

2008-05-14 Thread Galen Faidley
Hello All, I am updating an application from osgProducer to osgViewer. The last bit of functionality I need to replicate is taking a screenshot. I used osgProducer::Viewer::setWriteImageWhenDone in the past and was wondering if there was a replacement for it. I searched the archives but didn't

Re: [osg-users] Rendering to a image file (taking a screenshot)

2008-05-14 Thread Arne Kreutzmann
Hi, osg::ref_ptrosg::Image image = new osg::Image; image-readPixels(_x,_y,_width,_height, GL_RGB,GL_UNSIGNED_BYTE); osgDB::writeImageFile(*image,_filename); you could add that piece to a osgGA::GUIEventHandler so that it take the snapshot on a key press. Hope this helps. Regards

Re: [osg-users] Rendering to a image file (taking a screenshot)

2008-05-14 Thread Robert Osfield
Hi Galen and Arne, On Wed, May 14, 2008 at 7:32 PM, Arne Kreutzmann [EMAIL PROTECTED] wrote: osg::ref_ptrosg::Image image = new osg::Image; image-readPixels(_x,_y,_width,_height, GL_RGB,GL_UNSIGNED_BYTE); osgDB::writeImageFile(*image,_filename); you could add that piece to a

Re: [osg-users] Rendering to a image file (taking a screenshot)

2008-05-14 Thread Jean-Sébastien Guay
Hi Robert, My plan is to add an EventHandler to do screen snapshots and provide this along with the osgViewer::ViewEventHandlers family of handlers, its just time and a overflowing todo list has prevented me from tackling it. Others are welcome to dive in and add it :-) I'll do it, I'll do