Hi Rabbi, As Jason points out if your are doing the write image from the main loop and the view is multi-threaded then the main loop will be running in a parallel with the rendering.
The way to do it properly is to use a final draw callback to capture the image and then write it to the disk, or if you don't want to do the write in the draw thread for performance reasons pass the completed image to a thread safe queue that is read by a separate database writing threading. Robert. On Fri, Aug 14, 2009 at 8:58 PM, Rabbi Robinson<[email protected]> 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. > > Thank you! > > Cheers, > Rabbi > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=16275#16275 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

