HI Remi, The diff's don't help do a review as they aren't properly in context, the only way for me to do that would be to apply them, but I ain't going to apply something unless I know it's sound.
A quick look at the diff's, even without the full context of the code around it, strikes me like it's introducing a bug. When you add a update callback to the scene graph the scene graph has to assume that it needs to be called on every frame and will update the scene graph and re-render so you can see the end result - for instance if you have a update callback animating an object in the scene, you won't ever see it updating if your do dispatch another full frame. Now, if you don't feel this is appropriate behaviour for your particular application then fine, but it really is your particular application and that is is exactly where the changes should be made. It's dead simply to subclass from osgViewer::Viewer and CompositeViewer to provide custom behaviours, and in your own application you don't have even call the OSG's viewer::run() method that contains the ON_DEMAND code, you can do your own frame loop and manage it exactly how you see fit. Robert. Robert. Robert. On 27 January 2014 12:43, Rémi Thebault <[email protected]> wrote: > Hi Robert > > Experiencing around OSG, I found out that the update callback gets called > continously even when the Viewer's FrameScheme is ON_DEMAND. > > In case that this behaviour is not the expected one, I propose here a > (very) simple fix that tests _runFrameScheme in > Viewer::checkNeedToDoFrame() (and same for CompositeViewer) > > If relevant, I'm using a single threaded OSG scene within a Qt5 > application. > I can't tell if this would break existing code. > Please let me know what you think ! > > Cheers, > Rémi > > _______________________________________________ > osg-submissions mailing list > [email protected] > > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > >
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
