Moved the init traversal from cull() to the draw() to prevent graphics context

calls being made during the cull traversal - something that breaks the
ThreadPerCamera model in osgViewer
This commit is contained in:
Robert Osfield
2007-02-01 11:07:26 +00:00
parent 8dfc5155f4
commit a7c448a585

View File

@@ -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<RefMatrix> proj = new osg::RefMatrix(projection);
osg::ref_ptr<RefMatrix> 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