scenery: inline SGGenTile into its single caller.
This commit is contained in:
parent
9e46820c57
commit
9414874e1d
@ -53,6 +53,7 @@
|
|||||||
|
|
||||||
#include "ReaderWriterSPT.hxx"
|
#include "ReaderWriterSPT.hxx"
|
||||||
#include "ReaderWriterSTG.hxx"
|
#include "ReaderWriterSTG.hxx"
|
||||||
|
#include "SGOceanTile.hxx"
|
||||||
#include "TileEntry.hxx"
|
#include "TileEntry.hxx"
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
@ -314,8 +315,11 @@ TileEntry::loadTileByFileName(const string& fileName,
|
|||||||
} else {
|
} else {
|
||||||
// ... or generate an ocean tile on the fly
|
// ... or generate an ocean tile on the fly
|
||||||
SG_LOG(SG_TERRAIN, SG_INFO, " Generating ocean tile");
|
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,
|
SG_LOG( SG_TERRAIN, SG_ALERT,
|
||||||
"Warning: failed to generate ocean tile!" );
|
"Warning: failed to generate ocean tile!" );
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,6 @@
|
|||||||
#include "GroundLightManager.hxx"
|
#include "GroundLightManager.hxx"
|
||||||
|
|
||||||
|
|
||||||
#include "userdata.hxx"
|
|
||||||
#include "pt_lights.hxx"
|
#include "pt_lights.hxx"
|
||||||
|
|
||||||
using namespace simgear;
|
using namespace simgear;
|
||||||
|
@ -36,28 +36,13 @@
|
|||||||
#include <osg/Node>
|
#include <osg/Node>
|
||||||
#include <osg/Group>
|
#include <osg/Group>
|
||||||
|
|
||||||
#include "SGOceanTile.hxx"
|
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
class SGBucket;
|
|
||||||
class SGMaterialLib;
|
class SGMaterialLib;
|
||||||
namespace simgear {
|
namespace simgear {
|
||||||
class SGReaderWriterOptions;
|
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*
|
osg::Node*
|
||||||
SGLoadBTG(const std::string& path,
|
SGLoadBTG(const std::string& path,
|
||||||
const simgear::SGReaderWriterOptions* options);
|
const simgear::SGReaderWriterOptions* options);
|
||||||
|
Loading…
Reference in New Issue
Block a user