Added collateReferencesToDependentCameras() and clearReferencesToDependentCameras() methods into RenderStage and SceneView, and use

of these methods in src/osgViewer/Renderer.cpp to make sure that the draw thread keeps references to all in scene graph Cameras
that are being used by the drawing threads, to keep the Camera's alive even when the main thread removes these Cameras from the scene graph.
This commit is contained in:
Robert Osfield
2009-06-05 19:05:37 +00:00
parent 482a18b9f2
commit aa69137fb8
6 changed files with 84 additions and 8 deletions

View File

@@ -200,11 +200,11 @@ void LightPointNode::traverse(osg::NodeVisitor& nv)
}
}
// search for a drawable in the RenderLead list equal to the attached the one attached to StateGraph user data
// search for a drawable in the RenderLeaf list equal to the attached the one attached to StateGraph user data
// as this will be our special light point drawable.
osgUtil::StateGraph::LeafList::iterator litr;
for(litr = rg->_leaves.begin();
litr != rg->_leaves.end() && (*litr)->_drawable.get()!=drawable;
litr != rg->_leaves.end() && (*litr)->_drawable!=drawable;
++litr)
{}