#include "ReaderWriterSPT.hxx"
#include "ReaderWriterSTG.hxx"
+#include "SGOceanTile.hxx"
#include "TileEntry.hxx"
using std::string;
} else {
// ... or generate an ocean tile on the fly
SG_LOG(SG_TERRAIN, SG_INFO, " Generating ocean tile");
- if ( !SGGenTile( path_list[0], tile_bucket,
- opt->getMaterialLib(), new_tile ) ) {
+
+ osg::Node* node = SGOceanTile(tile_bucket, opt->getMaterialLib());
+ if ( node ) {
+ new_tile->addChild(node);
+ } else {
SG_LOG( SG_TERRAIN, SG_ALERT,
"Warning: failed to generate ocean tile!" );
}
#include <osg/Node>
#include <osg/Group>
-#include "SGOceanTile.hxx"
-
using std::string;
-class SGBucket;
class SGMaterialLib;
namespace simgear {
class SGReaderWriterOptions;
}
-// Generate an ocean tile
-inline bool SGGenTile( const std::string&, const SGBucket& b,
- SGMaterialLib *matlib, osg::Group* group )
-{
- // Generate an ocean tile
- osg::Node* node = SGOceanTile(b, matlib);
- if (!node)
- return false;
- group->addChild(node);
- return true;
-}
-
osg::Node*
SGLoadBTG(const std::string& path,
const simgear::SGReaderWriterOptions* options);