Hi Micahel, On 31 July 2013 05:17, michael kapelko <[email protected]> wrote: > Hi. I finally started to implement the described Timer functionality and was > faced with almost the same question: how do I subscribe to osgViewer each > frame update? > Should I add my class to osgViewer::ViewerBase::setUpdateVisitor?
There are several ways the best will depend upon your specific needs. One approach would be to implement your own frame() loop rather than rely upon run(), in this frame() loop you could updating your timer code right after the call to viewer.advance(); Another approach would be to subclass osgViewer and override the updateTraversal() method. Another would be to use an update callback attached to a node in the scene graph. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

