Hello Oliver,
With the pbuffer active, my WindowCaptureCallback is not called anymore. I used osgscreencapture to create an image grabber derived from WindowCaptureCallback but it looks like I have to use another approach with pbuffer (as done in the example code). I was curious if I could activate the WindowCaptureCallback even though using a pbuffer so that I use only one code for both cases?
The ScreenCaptureHandler in OSG 2.8.3 only looped through GraphicsWindow-derived contexts, which means contexts that are in a window. A pbuffer is derived from GraphicsContext, i.e. a context that might have a window but not necessarily (and indeed a pbuffer is meant not to spawn a window).
I submitted a change to this (in November 2009, so before the OpenSceneGraph-2.9.6 tag... geez it's been a while since the last trunk release ;-) ) so in the SVN version your callback should be called even for pbuffers. If you want this to work for pbuffers in 2.8.3, you can copy the code from SVN. It's in include/osgViewer/ViewerEventHandlers and src/osgViewer/ScreenCaptureHandler.cpp, the relevant method is called findAppropriateCameraForCallback(..).
I have made a few other similar submissions over the past year or so, since we've been using pbuffers for some things too. For example in the SVN version the StatsHandler will be displayed even in a pbuffer if there's no GraphicsWindow at all.
Hope this helps, J-S -- ______________________________________________________ Jean-Sebastien Guay [email protected] http://www.cm-labs.com/ http://whitestar02.webhop.org/ _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

