]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/model/SGPagedLOD.cxx
simgear/scene/sky/sky.cxx: Include sg_inlines.h with simgear/ prefix as all other...
[simgear.git] / simgear / scene / model / SGPagedLOD.cxx
index 37cc4e5c1dad0f0722b4e73e6d57cfc473c6e644..d309feb86dce44ad325dde7fd115ed3e7d3f0e49 100644 (file)
@@ -19,6 +19,8 @@
 #endif
 
 #include <osgDB/ReadFile>
+#include <osgDB/Input>
+#include <osgDB/ParameterOutput>
 
 #include <simgear/debug/logstream.hxx>
 #include <simgear/structure/OSGVersion.hxx>
@@ -27,7 +29,7 @@
 #include "SGReaderWriterXMLOptions.hxx"
 #include "SGPagedLOD.hxx"
 
-#include <simgear/Math/SGMath.hxx>
+#include <simgear/math/SGMath.hxx>
 
 using namespace osg;
 using namespace simgear;
@@ -58,15 +60,31 @@ bool SGPagedLOD::addChild(osg::Node *child)
     return true;
 }
 
-void SGPagedLOD::forceLoad(osgDB::DatabasePager *dbp)
+void SGPagedLOD::forceLoad(osgDB::DatabasePager *dbp, osg::FrameStamp* framestamp)
 {
     //SG_LOG(SG_GENERAL, SG_ALERT, "SGPagedLOD::forceLoad(" <<
     //getFileName(getNumChildren()) << ")");
     unsigned childNum = getNumChildren();
     setTimeStamp(childNum, 0);
     double priority=1.0;
-    dbp->requestNodeFile(getFileName(childNum),this,priority,0,
+    dbp->requestNodeFile(getFileName(childNum),this,priority,framestamp,
                          getDatabaseRequest(childNum),
                          _readerWriterOptions.get());
 }
 
+bool SGPagedLOD_writeLocalData(const Object& obj, osgDB::Output& fw)
+{
+    return true;
+}
+
+namespace
+{
+osgDB::RegisterDotOsgWrapperProxy sgPagedLODProxy
+(
+    new SGPagedLOD,
+    "simgear::SGPagedLOD",
+    "Object Node LOD PagedLOD SGPagedLOD Group",
+    0,
+    &SGPagedLOD_writeLocalData
+    );
+}