Moved setFusionDistance() into View::updateSceneView()
This commit is contained in:
parent
0eacd8161a
commit
6bd2d9054e
@ -543,6 +543,12 @@ void Renderer::updateSceneView(osgUtil::SceneView* sceneView)
|
|||||||
(*sceneView->getFrameStamp()) = *(state->getFrameStamp());
|
(*sceneView->getFrameStamp()) = *(state->getFrameStamp());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (view)
|
||||||
|
{
|
||||||
|
sceneView->setFusionDistance(view->getFusionDistanceMode(), view->getFusionDistanceValue());
|
||||||
|
}
|
||||||
|
|
||||||
osg::DisplaySettings* ds = _camera->getDisplaySettings() ? _camera->getDisplaySettings() :
|
osg::DisplaySettings* ds = _camera->getDisplaySettings() ? _camera->getDisplaySettings() :
|
||||||
((view &&view->getDisplaySettings()) ? view->getDisplaySettings() : osg::DisplaySettings::instance().get());
|
((view &&view->getDisplaySettings()) ? view->getDisplaySettings() : osg::DisplaySettings::instance().get());
|
||||||
|
|
||||||
@ -643,10 +649,6 @@ void Renderer::cull()
|
|||||||
|
|
||||||
// OSG_NOTICE<<"Culling buffer "<<_currentCull<<std::endl;
|
// OSG_NOTICE<<"Culling buffer "<<_currentCull<<std::endl;
|
||||||
|
|
||||||
// pass on the fusion distance settings from the View to the SceneView
|
|
||||||
osgViewer::View* view = dynamic_cast<osgViewer::View*>(sceneView->getCamera()->getView());
|
|
||||||
if (view) sceneView->setFusionDistance(view->getFusionDistanceMode(), view->getFusionDistanceValue());
|
|
||||||
|
|
||||||
osg::Stats* stats = sceneView->getCamera()->getStats();
|
osg::Stats* stats = sceneView->getCamera()->getStats();
|
||||||
const osg::FrameStamp* fs = sceneView->getFrameStamp();
|
const osg::FrameStamp* fs = sceneView->getFrameStamp();
|
||||||
unsigned int frameNumber = fs ? fs->getFrameNumber() : 0;
|
unsigned int frameNumber = fs ? fs->getFrameNumber() : 0;
|
||||||
@ -820,13 +822,8 @@ void Renderer::cull_draw()
|
|||||||
compile();
|
compile();
|
||||||
}
|
}
|
||||||
|
|
||||||
osgViewer::View* view = dynamic_cast<osgViewer::View*>(_camera->getView());
|
|
||||||
|
|
||||||
// OSG_NOTICE<<"RenderingOperation"<<std::endl;
|
// OSG_NOTICE<<"RenderingOperation"<<std::endl;
|
||||||
|
|
||||||
// pass on the fusion distance settings from the View to the SceneView
|
|
||||||
if (view) sceneView->setFusionDistance(view->getFusionDistanceMode(), view->getFusionDistanceValue());
|
|
||||||
|
|
||||||
osg::Stats* stats = sceneView->getCamera()->getStats();
|
osg::Stats* stats = sceneView->getCamera()->getStats();
|
||||||
osg::State* state = sceneView->getState();
|
osg::State* state = sceneView->getState();
|
||||||
const osg::FrameStamp* fs = sceneView->getFrameStamp();
|
const osg::FrameStamp* fs = sceneView->getFrameStamp();
|
||||||
|
Loading…
Reference in New Issue
Block a user