[osg-users] object shaking

Peter Wraae Marino osghelp at gmail.com
Mon Jun 2 04:42:59 PDT 2008


Hi Robert,

Thanks for all your advice, really do appreciate it.

As you mentioned the camera needs to finish it's update traversal, so I
decided to try
the cull-callback which should be called after all updates have been
done.... but the scene
still shakes when using the cull-callback and this kinda baffles me.

any suggestions why?

regards,
Peter

On Mon, Jun 2, 2008 at 12:40 PM, Robert Osfield <robert.osfield at gmail.com>
wrote:

> Hi Peter,
>
> On Mon, Jun 2, 2008 at 10:52 AM, Peter Wraae Marino <osghelp at gmail.com>
> wrote:
> > Also I understand why this works, but don't really approve of it because
> it
> > makes my code more "hardcoded" because I need to implement a direct
> update
> > call after viewer->updateTraversal() which is kinda breaking the whole
> > framework that osg is built for. For example if at a later point you
> decide
> > to add another traversal then I will have to manually add it here myself.
> > Also anyone using my code will have to break their main loop to handle
> the
> > grid example.
>
> Adding your own custom update code into the frame loop is perfectly
> normal OSG usage, it's not breaking anything w.r.t the OSG framework -
> the frame loop is constructed this way deliberately so that unusual
> usage requirements can be met easily.
>
>
> > Isn't there a method to make sure my updatecallback is called after the
> > camera has done it's stuff?
>
> There is no "option" for configuring when the camera update is done,
> it's implemented to work the way most users will require it, but...
> osgViewer::ViewBase has virtual functions for updateTraversals() etc
> so you can customize it to do what you required, or just roll your own
> frame loop.  Which route you take is up to you - either is perfectly
> reasonable and intended usage of the OSG.
>
> Robert.
>  _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080602/244cd553/attachment.htm>


More information about the osg-users mailing list