From 416e6486f7d260d9426fedf21cf3912441ad933e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 20 Feb 2007 16:46:53 +0000 Subject: [PATCH] Added inhertCullSettings before SceneView::cull() calls --- src/osgViewer/CompositeViewer.cpp | 1 + src/osgViewer/Viewer.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/osgViewer/CompositeViewer.cpp b/src/osgViewer/CompositeViewer.cpp index 496b102a5..e05ffa935 100644 --- a/src/osgViewer/CompositeViewer.cpp +++ b/src/osgViewer/CompositeViewer.cpp @@ -519,6 +519,7 @@ struct CompositeViewerRenderingOperation : public osg::Operation // osg::notify(osg::NOTICE)<<"RenderingOperation"<inheritCullSettings(*(_sceneView->getCamera())); _sceneView->cull(); _sceneView->draw(); diff --git a/src/osgViewer/Viewer.cpp b/src/osgViewer/Viewer.cpp index 7064a43da..99cbf5241 100644 --- a/src/osgViewer/Viewer.cpp +++ b/src/osgViewer/Viewer.cpp @@ -163,7 +163,12 @@ struct ViewerRenderingOperation : public osg::Operation, public ViewerQuerySuppo // do cull taversal osg::Timer_t beforeCullTick = osg::Timer::instance()->tick(); + + _sceneView->inheritCullSettings(*(_sceneView->getCamera())); + _sceneView->cull(); + + osg::Timer_t afterCullTick = osg::Timer::instance()->tick(); #if 0 @@ -310,7 +315,10 @@ struct ViewerDoubleBufferedRenderingOperation : public osg::Operation, public Vi // do cull taversal osg::Timer_t beforeCullTick = osg::Timer::instance()->tick(); + + sceneView->inheritCullSettings(*(sceneView->getCamera())); sceneView->cull(); + osg::Timer_t afterCullTick = osg::Timer::instance()->tick(); #if 0 @@ -467,7 +475,10 @@ struct ViewerDoubleBufferedRenderingOperation : public osg::Operation, public Vi // do cull taversal osg::Timer_t beforeCullTick = osg::Timer::instance()->tick(); + + sceneView->inheritCullSettings(*(sceneView->getCamera())); sceneView->cull(); + osg::Timer_t afterCullTick = osg::Timer::instance()->tick(); if (state->getDynamicObjectCount()==0 && state->getDynamicObjectRenderingCompletedCallback())