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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user