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:
parent
569a29fbbc
commit
daef76ec0b
@ -47,6 +47,8 @@ bool SGPagedLOD::addChild(osg::Node *child)
|
||||
if (!PagedLOD::addChild(child))
|
||||
return false;
|
||||
|
||||
setRadius(getBound().radius());
|
||||
setCenter(getBound().center());
|
||||
// if the model was an .xml-file it will have UserData set
|
||||
osg::ref_ptr<SGModelData> d = dynamic_cast<SGModelData*>(child->getUserData());
|
||||
if (d.valid())
|
||||
|
Loading…
Reference in New Issue
Block a user