Thanks, that's what I'll do. And about my second question: is there a way to avoid the implicit swapping of the back and front buffers at the end of redraw? I mean, by some settings on the camera.
Furthermore, is there also a way to force a glFinish(); before swapping, in order to be sure that the whole drawing is done? I have a problem with a graphic board (nVidia GeForce 6800) on mac. It looks like the swap operation comes too fast (before the rendering pipeline has finished to process all the geometry), and in consequence some parts of the model are missing, and in different times, giving a very bad "flickering" effect. Thanks Gianluca -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Robert Osfield Sent: venerdì 14 agosto 2009 12.59 To: OpenSceneGraph Users Subject: Re: [osg-users] global bounding sphere with autotransformed objects Hi Gianluca, The AutoTransform adjusts it's internal settings based on the eye position, which is acquired during the cull traversal. Have a look at the implementation of the AutoTransform::accept() to see what is going. If you want to find the value of the AutoTransform for a given camera position prior to the cull traversal then you'll need to do a dummy cull traversal by creating your own cull visitor. Robert. On Mon, Aug 10, 2009 at 11:42 AM, Gianluca Natale<[email protected]> wrote: > Hi All. > I have this problem, with OSG 2.8.0. > > > > In my scenegraph there is some object attached as a child of an > Autotransform matrix > (I need to keep its size constant on the screen, wherever is the camera). > > I have also to fit the model in the screen, using the global bounding sphere > of the model. > Ive seen that the bounding sphere is computed during the rendering > traversal. > > And that the bounding sphere of auto-transformed objects changes as the > camera position > changes, while the bounding sphere of the other objects is constant. This is > what I expected, since > the size on the screen must be constant. > > So, I thought that I can compute the global bounding sphere of my model by > multiple iterative redraws, > > until the global bounding sphere at step n is almost the same as that at > step n-1. > And it works. > > > > Is there a way to update the bounding sphere of autotransformed object > without redrawing? > I mean, I would need to show directly the model fit in the screen, without > showing the user all the single steps. > Or, at least, may I avoid the swap of back and front buffers at the end of > redraw? In this way I could > make the back and front buffers be swapped only at the end of fit. > > > > Thanks in advance > > Gianluca Natale > > > > > > _______________________________________________ > 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 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.55/2301 - Release Date: 08/13/09 18:16:00 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

