Till BUSCH:
"tim recently noticed the database pager was repeatedly loading and unloading the same objects. he also tracked down the problem to missing bounding sphere information in osgDB::PagedLOD. this is a simplicistic approach to fix this: SGPagedLOD will now remember whatever value it sees for getBound() after loading a child. this patch will make database pager run much calmer."
This commit is contained in:
@@ -47,6 +47,8 @@ bool SGPagedLOD::addChild(osg::Node *child)
|
|||||||
if (!PagedLOD::addChild(child))
|
if (!PagedLOD::addChild(child))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
setRadius(getBound().radius());
|
||||||
|
setCenter(getBound().center());
|
||||||
// if the model was an .xml-file it will have UserData set
|
// if the model was an .xml-file it will have UserData set
|
||||||
osg::ref_ptr<SGModelData> d = dynamic_cast<SGModelData*>(child->getUserData());
|
osg::ref_ptr<SGModelData> d = dynamic_cast<SGModelData*>(child->getUserData());
|
||||||
if (d.valid())
|
if (d.valid())
|
||||||
|
|||||||
Reference in New Issue
Block a user