diff --git a/src/osgUtil/SceneView.cpp b/src/osgUtil/SceneView.cpp index d42817502..b0a146a30 100644 --- a/src/osgUtil/SceneView.cpp +++ b/src/osgUtil/SceneView.cpp @@ -633,9 +633,6 @@ void SceneView::cullStage(const osg::Matrixd& projection,const osg::Matrixd& mod if (!_camera || !getViewport()) return; - if (!_initCalled) init(); - - osg::ref_ptr proj = new osg::RefMatrix(projection); osg::ref_ptr mv = new osg::RefMatrix(modelview); @@ -841,6 +838,8 @@ void SceneView::draw() { if (_camera->getNodeMask()==0) return; + if (!_initCalled) init(); + osg::State* state = _renderInfo.getState(); // note, to support multi-pipe systems the deletion of OpenGL display list