Added support for using PagedLOD to managing loading of presentation preview and then the main presentation in the background paging thread

This commit is contained in:
Robert Osfield
2009-07-16 10:12:33 +00:00
parent a13b32a124
commit 137605eba8
2 changed files with 126 additions and 29 deletions

View File

@@ -182,10 +182,9 @@ osg::Node* p3d::readHoldingSlide(const std::string& filename)
if (!osgDB::equalCaseInsensitive(ext,"xml") &&
!osgDB::equalCaseInsensitive(ext,"p3d")) return 0;
osg::ref_ptr<osgDB::ReaderWriter::Options> options = new osgDB::ReaderWriter::Options;
osg::ref_ptr<osgDB::ReaderWriter::Options> options = createOptions(0);
options->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_NONE);
options->setOptionString("holding_slide");
options->setPluginStringData("P3D_EVENTHANDLER","none");
options->setOptionString("preview");
return osgDB::readNodeFile(filename, options.get());
}
@@ -197,12 +196,15 @@ osg::Node* p3d::readPresentation(const std::string& filename,const osgDB::Reader
!osgDB::equalCaseInsensitive(ext,"p3d")) return 0;
osg::ref_ptr<osgDB::Options> local_options = createOptions(options);
local_options->setOptionString("main");
return osgDB::readNodeFile(filename, local_options.get());
}
osg::Node* p3d::readShowFiles(osg::ArgumentParser& arguments,const osgDB::ReaderWriter::Options* options)
{
osg::ref_ptr<osgDB::Options> local_options = createOptions(options);
local_options->setOptionString("main");
typedef std::vector< osg::ref_ptr<osg::Node> > NodeList;
NodeList nodeList;