From ca582c708d9dbef424f077355bfc9d3bc6cfd40d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 31 Oct 2011 15:29:49 +0000 Subject: [PATCH] Adding missing checks against View's Camera and SceneData for any update callbacks that need calling. --- src/osgViewer/CompositeViewer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/osgViewer/CompositeViewer.cpp b/src/osgViewer/CompositeViewer.cpp index 7102ea5ab..d963d5ef7 100644 --- a/src/osgViewer/CompositeViewer.cpp +++ b/src/osgViewer/CompositeViewer.cpp @@ -256,6 +256,10 @@ bool CompositeViewer::checkNeedToDoFrame() // set so that the updates show up if (view->getDatabasePager()->requiresUpdateSceneGraph() || view->getDatabasePager()->getRequestsInProgress()) return true; + + // if there update callbacks then we need to do frame. + if (view->getCamera()->getUpdateCallback()) return true; + if (view->getSceneData()!=0 && view->getSceneData()->getNumChildrenRequiringUpdateTraversal()>0) return true; } }