Hi Robert,

On 2/6/09 1:22 PM, Robert Osfield wrote:
                 osg::NodePath nodePath;
                 osg::NodePathList nodePathList =
groupForAddingLoadedSubgraph->getParentalNodePaths();
                 if (!nodePathList.empty()) nodePath = nodePathList.front();
                 nodePath.push_back(groupForAddingLoadedSubgraph.get());

Now NodePath doesn't take any references, it's just a
std::vector<osg::Node*>.  To fix this problem we'd need to use a
RefNodePath, and for the getParentNodePaths() to populate a list of
RefNodePath rather than a list of NodePath.

The other solution would be to wait till the DatabasePager is idle
before your do a delete of the scene graph.

How can I check that?  getRequestsInProgress() is always returning true:

pager->setAcceptNewDatabaseRequests(false);
while (pager->getRequestsInProgress()) {
   viewer->frame(); // presumably necessary to merge tiles?
}

Would you agree that the RefNodePathList is the better long-term solution?

Thanks a lot for your help,
Cheers,
/ulrich
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to