Rabbi Robinson wrote:
Hi,
I attach the image to the camera and use PRE_RENDER for the camera. I just use the osgDB to write the image to file.
I also notice that the chance of getting an image for calling viewer.frame()
once is zero. What I do now is calling frame() for 10 times before saving the
image. Still, the image can be incomplete.
Have you looked at the osgscreencapture example? The problem is that
you're running a multi-threaded viewer and you're not synchronizing
between the drawing of the frame and the grabbing of the image. You
can't just put a writeImageFile() after the frame() call and expect it
to work.
--"J"
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org