Hi Peter,

On Mon, Jun 2, 2008 at 10:52 AM, Peter Wraae Marino <[EMAIL PROTECTED]> 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
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to