# include <config.h>
#endif
-#include <simgear/scene/model/SGPagedLOD.hxx>
#include <simgear/math/SGMath.hxx>
#include "SceneryPager.hxx"
#include <algorithm>
{
}
-#if SG_PAGEDLOD_HAS_OPTIONS
-#else
-void SceneryPager::requestNodeFile(const std::string& fileName, Group* group,
- float priority, const FrameStamp* framestamp,
- ref_ptr<Referenced>& databaseRequest,
- osgDB::ReaderWriter::Options* options)
-{
- simgear::SGPagedLOD *sgplod = dynamic_cast<simgear::SGPagedLOD*>(group);
- if(sgplod)
- DatabasePager::requestNodeFile(fileName, group, priority, framestamp,
- databaseRequest,
- sgplod->getReaderWriterOptions());
- else
- DatabasePager::requestNodeFile(fileName, group, priority, framestamp,
- databaseRequest,
- options);
-}
-#endif
-
void SceneryPager::queueRequest(const std::string& fileName, Group* group,
float priority, FrameStamp* frameStamp,
ref_ptr<Referenced>& databaseRequest,
#include <osgDB/DatabasePager>
#include <simgear/structure/OSGVersion.hxx>
-#include <simgear/scene/model/SGPagedLOD.hxx>
namespace flightgear
{
SceneryPager(const SceneryPager& rhs);
// Unhide DatabasePager::requestNodeFile
using osgDB::DatabasePager::requestNodeFile;
- // reimplement to add readerWriterOptions from SGPagedLOD
-#if SG_PAGEDLOD_HAS_OPTIONS
-#else
- virtual void requestNodeFile(const std::string& fileName, osg::Group* group,
- float priority,
- const osg::FrameStamp* framestamp,
- osg::ref_ptr<osg::Referenced>& databaseRequest,
- osgDB::ReaderWriter::Options* options);
-#endif
void queueRequest(const std::string& fileName, osg::Group* node,
float priority, osg::FrameStamp* frameStamp,
osg::ref_ptr<osg::Referenced>& databaseRequest,
#include <functional>
#include <osgViewer/Viewer>
+#include <osgDB/Registry>
#include <simgear/constants.h>
#include <simgear/debug/logstream.hxx>
new FGNasalModelData);
else
result=
- SGModelLib::loadPagedModel(fullPath.str(), globals->get_props(),
- new FGNasalModelData);
+ SGModelLib::loadDeferedModel(fullPath.str(), globals->get_props(),
+ new FGNasalModelData);
} catch (const sg_io_exception& exc) {
string m(exc.getMessage());
m += " ";