Tobias Münch wrote on Thursday, February 07, 2008 4:26 PM:
> I'm using PostDrawCallback to make a screenshot in a realtime
> environment with CompositeViewer. Therefor I add this callback when
> user wants to make the screenshot. But after adding this callback to
> the camera, a screenshot is taken after each new frame. I just want
> to have a screenshot of the current frame and then the callback
> should be automatically removed. I can't find a method to remove the
> callback from the camera after successfully taking a screenshot.      
> 
> in the main:
> viewer->getView(viewer->getNumViews()-1)->getCamera()->setPostDrawCallback(new
> ScreenShotCallback(_twidth,_theight,filename)); 

viewer->getView(viewer->getNumViews()-1)->getCamera()->setPostDrawCallback(NULL);
 

Be sure you do this during the update phase, though, so you don't interfere 
with the cull and draw traversals.

-- 
Bryan Thrall
FlightSafety International
[EMAIL PROTECTED]
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to