diff --git a/src/osgViewer/Renderer.cpp b/src/osgViewer/Renderer.cpp index 06620af32..706277801 100644 --- a/src/osgViewer/Renderer.cpp +++ b/src/osgViewer/Renderer.cpp @@ -543,6 +543,12 @@ void Renderer::updateSceneView(osgUtil::SceneView* sceneView) (*sceneView->getFrameStamp()) = *(state->getFrameStamp()); } + + if (view) + { + sceneView->setFusionDistance(view->getFusionDistanceMode(), view->getFusionDistanceValue()); + } + osg::DisplaySettings* ds = _camera->getDisplaySettings() ? _camera->getDisplaySettings() : ((view &&view->getDisplaySettings()) ? view->getDisplaySettings() : osg::DisplaySettings::instance().get()); @@ -643,10 +649,6 @@ void Renderer::cull() // OSG_NOTICE<<"Culling buffer "<<_currentCull<(sceneView->getCamera()->getView()); - if (view) sceneView->setFusionDistance(view->getFusionDistanceMode(), view->getFusionDistanceValue()); - osg::Stats* stats = sceneView->getCamera()->getStats(); const osg::FrameStamp* fs = sceneView->getFrameStamp(); unsigned int frameNumber = fs ? fs->getFrameNumber() : 0; @@ -820,13 +822,8 @@ void Renderer::cull_draw() compile(); } - osgViewer::View* view = dynamic_cast(_camera->getView()); - // OSG_NOTICE<<"RenderingOperation"<setFusionDistance(view->getFusionDistanceMode(), view->getFusionDistanceValue()); - osg::Stats* stats = sceneView->getCamera()->getStats(); osg::State* state = sceneView->getState(); const osg::FrameStamp* fs = sceneView->getFrameStamp();