From 6bd2d9054e8a02d87ef1855b531df01b389975d3 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 10 Jan 2018 16:55:02 +0000 Subject: [PATCH] Moved setFusionDistance() into View::updateSceneView() --- src/osgViewer/Renderer.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) 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();