hi all,

i'm working on model-paging in flightgear. it works fine so far, but i had to 
introduce some quirks to get around the limited hooks in PagedLOD and 
DatabasePager.

so i'd like to propose a few changes to PagedLOD and DatabasePager APIs.

1. DatabasePager:
requestNodeFile (const std::string &fileName, osg::Group *group, float 
priority, const osg::FrameStamp *framestamp, ReaderWriter::Options 
*loadOptions)

should be published published in osg::NodeVisitor::DatabaseRequestHandler
so that loadOptions can be set separately for each PagedLOD.

2. PagedLOD:
i suggest adding a new virtual function in PagedLOD:

requestNodeFile(osg::NodeVisitor::DatabaseRequestHandler *dbrh, const 
std::string &fileName, osg::Group *group, float priority, const 
osg::FrameStamp *framestamp).

in PagedLOD::traverse(osg::NodeVisitor& nv) this function should be called, so 
a subclass can modify the call to the 
DatabaseRequestHandler::requestNodeFile(), as described above.
the default implementation could just do what it does now. i.e. call 
osg::NodeVisitor::DatabaseRequestHandler::requestNodeFile (const std::string 
&fileName, osg::Group *group, float priority, const osg::FrameStamp 
*framestamp) with no special loadOptions.

3. DatabasePager
looking through the archives i have found other people needing a hook in 
addLoadedDataToSceneGraph().
should we add one? i now think i could just as well reimplement 
PagedLOD::addChild() to see when a new child gets paged in.

if you are in support of 1 and 2 i'd be happy to prepare the modified files 
and send them.

cheers,

-till


p.s. sorry. it is really hard to describe such things with words ;-)
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to