Replace osgDB::ReaderWriter::Options to osgDB::Options.
This has changed in osg, so reflect that here.
This commit is contained in:
parent
8c78588ee1
commit
11fd888ed8
@ -96,7 +96,7 @@ SGMaterial::SGMaterial( const SGReaderWriterOptions* options,
|
||||
buildEffectProperties(options);
|
||||
}
|
||||
|
||||
SGMaterial::SGMaterial( const osgDB::ReaderWriter::Options* options,
|
||||
SGMaterial::SGMaterial( const osgDB::Options* options,
|
||||
const SGPropertyNode *props,
|
||||
SGPropertyNode *prop_root)
|
||||
{
|
||||
|
@ -89,7 +89,7 @@ public:
|
||||
* state information for the material. This node is usually
|
||||
* loaded from the $FG_ROOT/materials.xml file.
|
||||
*/
|
||||
SGMaterial( const osgDB::ReaderWriter::Options*,
|
||||
SGMaterial( const osgDB::Options*,
|
||||
const SGPropertyNode *props,
|
||||
SGPropertyNode *prop_root);
|
||||
|
||||
|
@ -67,9 +67,9 @@ bool SGMaterialLib::load( const string &fg_root, const string& mpath,
|
||||
<< ex.getMessage() );
|
||||
throw;
|
||||
}
|
||||
osg::ref_ptr<osgDB::ReaderWriter::Options> options
|
||||
= new osgDB::ReaderWriter::Options;
|
||||
options->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_ALL);
|
||||
osg::ref_ptr<osgDB::Options> options
|
||||
= new osgDB::Options;
|
||||
options->setObjectCacheHint(osgDB::Options::CACHE_ALL);
|
||||
options->setDatabasePath(fg_root);
|
||||
int nMaterials = materials.nChildren();
|
||||
for (int i = 0; i < nMaterials; i++) {
|
||||
|
@ -193,7 +193,7 @@ public:
|
||||
} // namespace
|
||||
|
||||
Node* DefaultProcessPolicy::process(Node* node, const string& filename,
|
||||
const ReaderWriter::Options* opt)
|
||||
const Options* opt)
|
||||
{
|
||||
TextureNameVisitor nameVisitor;
|
||||
node->accept(nameVisitor);
|
||||
@ -202,7 +202,7 @@ Node* DefaultProcessPolicy::process(Node* node, const string& filename,
|
||||
|
||||
ReaderWriter::ReadResult
|
||||
ModelRegistry::readImage(const string& fileName,
|
||||
const ReaderWriter::Options* opt)
|
||||
const Options* opt)
|
||||
{
|
||||
CallbackMap::iterator iter
|
||||
= imageCallbackMap.find(getFileExtension(fileName));
|
||||
@ -300,7 +300,7 @@ ModelRegistry::readImage(const string& fileName,
|
||||
|
||||
|
||||
osg::Node* DefaultCachePolicy::find(const string& fileName,
|
||||
const ReaderWriter::Options* opt)
|
||||
const Options* opt)
|
||||
{
|
||||
Registry* registry = Registry::instance();
|
||||
osg::Node* cached
|
||||
@ -342,7 +342,7 @@ OptimizeModelPolicy::OptimizeModelPolicy(const string& extension) :
|
||||
|
||||
osg::Node* OptimizeModelPolicy::optimize(osg::Node* node,
|
||||
const string& fileName,
|
||||
const osgDB::ReaderWriter::Options* opt)
|
||||
const osgDB::Options* opt)
|
||||
{
|
||||
osgUtil::Optimizer optimizer;
|
||||
optimizer.optimize(node, _osgOptions);
|
||||
@ -358,7 +358,7 @@ osg::Node* OptimizeModelPolicy::optimize(osg::Node* node,
|
||||
}
|
||||
|
||||
string OSGSubstitutePolicy::substitute(const string& name,
|
||||
const ReaderWriter::Options* opt)
|
||||
const Options* opt)
|
||||
{
|
||||
string fileSansExtension = getNameLessExtension(name);
|
||||
string osgFileName = fileSansExtension + ".osg";
|
||||
@ -413,7 +413,7 @@ ModelRegistry::addNodeCallbackForExtension(const string& extension,
|
||||
|
||||
ReaderWriter::ReadResult
|
||||
ModelRegistry::readNode(const string& fileName,
|
||||
const ReaderWriter::Options* opt)
|
||||
const Options* opt)
|
||||
{
|
||||
ReaderWriter::ReadResult res;
|
||||
CallbackMap::iterator iter
|
||||
@ -436,10 +436,10 @@ public:
|
||||
Referenced::setThreadSafeReferenceCounting(true);
|
||||
|
||||
Registry* registry = Registry::instance();
|
||||
ReaderWriter::Options* options = new ReaderWriter::Options;
|
||||
int cacheOptions = ReaderWriter::Options::CACHE_ALL;
|
||||
Options* options = new Options;
|
||||
int cacheOptions = Options::CACHE_ALL;
|
||||
options->
|
||||
setObjectCacheHint((ReaderWriter::Options::CacheHintOptions)cacheOptions);
|
||||
setObjectCacheHint((Options::CacheHintOptions)cacheOptions);
|
||||
registry->setOptions(options);
|
||||
registry->getOrCreateSharedStateManager()->
|
||||
setShareMode(SharedStateManager::SHARE_STATESETS);
|
||||
@ -457,7 +457,7 @@ struct ACOptimizePolicy : public OptimizeModelPolicy {
|
||||
_osgOptions &= ~Optimizer::TRISTRIP_GEOMETRY;
|
||||
}
|
||||
Node* optimize(Node* node, const string& fileName,
|
||||
const ReaderWriter::Options* opt)
|
||||
const Options* opt)
|
||||
{
|
||||
ref_ptr<Node> optimized
|
||||
= OptimizeModelPolicy::optimize(node, fileName, opt);
|
||||
@ -484,7 +484,7 @@ struct ACOptimizePolicy : public OptimizeModelPolicy {
|
||||
struct ACProcessPolicy {
|
||||
ACProcessPolicy(const string& extension) {}
|
||||
Node* process(Node* node, const string& filename,
|
||||
const ReaderWriter::Options* opt)
|
||||
const Options* opt)
|
||||
{
|
||||
Matrix m(1, 0, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
}
|
||||
virtual osgDB::ReaderWriter::ReadResult
|
||||
readNode(const std::string& fileName,
|
||||
const osgDB::ReaderWriter::Options* opt)
|
||||
const osgDB::Options* opt)
|
||||
{
|
||||
using namespace osg;
|
||||
using namespace osgDB;
|
||||
@ -103,7 +103,7 @@ public:
|
||||
protected:
|
||||
static osgDB::ReaderWriter::ReadResult
|
||||
loadUsingReaderWriter(const std::string& fileName,
|
||||
const osgDB::ReaderWriter::Options* opt)
|
||||
const osgDB::Options* opt)
|
||||
{
|
||||
using namespace osgDB;
|
||||
ReaderWriter* rw = Registry::instance()
|
||||
@ -126,20 +126,20 @@ protected:
|
||||
struct DefaultProcessPolicy {
|
||||
DefaultProcessPolicy(const std::string& extension) {}
|
||||
osg::Node* process(osg::Node* node, const std::string& filename,
|
||||
const osgDB::ReaderWriter::Options* opt);
|
||||
const osgDB::Options* opt);
|
||||
};
|
||||
|
||||
struct DefaultCachePolicy {
|
||||
DefaultCachePolicy(const std::string& extension) {}
|
||||
osg::Node* find(const std::string& fileName,
|
||||
const osgDB::ReaderWriter::Options* opt);
|
||||
const osgDB::Options* opt);
|
||||
void addToCache(const std::string& filename, osg::Node* node);
|
||||
};
|
||||
|
||||
struct NoCachePolicy {
|
||||
NoCachePolicy(const std::string& extension) {}
|
||||
osg::Node* find(const std::string& fileName,
|
||||
const osgDB::ReaderWriter::Options* opt)
|
||||
const osgDB::Options* opt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -150,7 +150,7 @@ class OptimizeModelPolicy {
|
||||
public:
|
||||
OptimizeModelPolicy(const std::string& extension);
|
||||
osg::Node* optimize(osg::Node* node, const std::string& fileName,
|
||||
const osgDB::ReaderWriter::Options* opt);
|
||||
const osgDB::Options* opt);
|
||||
protected:
|
||||
unsigned _osgOptions;
|
||||
};
|
||||
@ -158,7 +158,7 @@ protected:
|
||||
struct NoOptimizePolicy {
|
||||
NoOptimizePolicy(const std::string& extension) {}
|
||||
osg::Node* optimize(osg::Node* node, const std::string& fileName,
|
||||
const osgDB::ReaderWriter::Options* opt)
|
||||
const osgDB::Options* opt)
|
||||
{
|
||||
return node;
|
||||
}
|
||||
@ -167,13 +167,13 @@ struct NoOptimizePolicy {
|
||||
struct OSGSubstitutePolicy {
|
||||
OSGSubstitutePolicy(const std::string& extension) {}
|
||||
std::string substitute(const std::string& name,
|
||||
const osgDB::ReaderWriter::Options* opt);
|
||||
const osgDB::Options* opt);
|
||||
};
|
||||
|
||||
struct NoSubstitutePolicy {
|
||||
NoSubstitutePolicy(const std::string& extension) {}
|
||||
std::string substitute(const std::string& name,
|
||||
const osgDB::ReaderWriter::Options* opt)
|
||||
const osgDB::Options* opt)
|
||||
{
|
||||
return std::string();
|
||||
}
|
||||
@ -206,10 +206,10 @@ public:
|
||||
ModelRegistry();
|
||||
virtual osgDB::ReaderWriter::ReadResult
|
||||
readImage(const std::string& fileName,
|
||||
const osgDB::ReaderWriter::Options* opt);
|
||||
const osgDB::Options* opt);
|
||||
virtual osgDB::ReaderWriter::ReadResult
|
||||
readNode(const std::string& fileName,
|
||||
const osgDB::ReaderWriter::Options* opt);
|
||||
const osgDB::Options* opt);
|
||||
void addImageCallbackForExtension(const std::string& extension,
|
||||
osgDB::Registry::ReadFileCallback*
|
||||
callback);
|
||||
|
@ -412,7 +412,7 @@ private:
|
||||
|
||||
SGMaterialAnimation::SGMaterialAnimation(const SGPropertyNode* configNode,
|
||||
SGPropertyNode* modelRoot,
|
||||
const osgDB::ReaderWriter::Options*
|
||||
const osgDB::Options*
|
||||
options) :
|
||||
SGAnimation(configNode, modelRoot),
|
||||
texturePathList(options->getDatabasePathList())
|
||||
|
@ -23,7 +23,7 @@ class SGMaterialAnimation : public SGAnimation {
|
||||
public:
|
||||
SGMaterialAnimation(const SGPropertyNode* configNode,
|
||||
SGPropertyNode* modelRoot,
|
||||
const osgDB::ReaderWriter::Options* options);
|
||||
const osgDB::Options* options);
|
||||
virtual osg::Group* createAnimationGroup(osg::Group& parent);
|
||||
virtual void install(osg::Node& node);
|
||||
static SGPropertyNode_ptr makeEffectProperties(const SGPropertyNode* animProp);
|
||||
|
@ -58,7 +58,7 @@ using namespace osg;
|
||||
|
||||
static osg::Node *
|
||||
sgLoad3DModel_internal(const SGPath& path,
|
||||
const osgDB::ReaderWriter::Options* options,
|
||||
const osgDB::Options* options,
|
||||
SGPropertyNode *overlay = 0);
|
||||
|
||||
|
||||
@ -78,7 +78,7 @@ const char* SGReaderWriterXML::className() const
|
||||
|
||||
osgDB::ReaderWriter::ReadResult
|
||||
SGReaderWriterXML::readNode(const std::string& fileName,
|
||||
const osgDB::ReaderWriter::Options* options) const
|
||||
const osgDB::Options* options) const
|
||||
{
|
||||
osg::Node *result=0;
|
||||
try {
|
||||
@ -200,7 +200,7 @@ void makeEffectAnimations(PropertyList& animation_nodes,
|
||||
|
||||
static osg::Node *
|
||||
sgLoad3DModel_internal(const SGPath& path,
|
||||
const osgDB::ReaderWriter::Options* options_,
|
||||
const osgDB::Options* options_,
|
||||
SGPropertyNode *overlay)
|
||||
{
|
||||
if (!path.exists()) {
|
||||
|
@ -33,7 +33,7 @@ public:
|
||||
virtual const char* className() const;
|
||||
|
||||
virtual ReadResult readNode(const std::string& fileName,
|
||||
const osgDB::ReaderWriter::Options* options)
|
||||
const osgDB::Options* options)
|
||||
const;
|
||||
};
|
||||
|
||||
|
@ -84,7 +84,7 @@ void SGText::UpdateCallback::operator()(osg::Node * node, osg::NodeVisitor *nv )
|
||||
}
|
||||
|
||||
osg::Node * SGText::appendText(const SGPropertyNode* configNode,
|
||||
SGPropertyNode* modelRoot, const osgDB::ReaderWriter::Options* options)
|
||||
SGPropertyNode* modelRoot, const osgDB::Options* options)
|
||||
{
|
||||
SGConstPropertyNode_ptr p;
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
class SGText : public osg::NodeCallback
|
||||
{
|
||||
public:
|
||||
static osg::Node * appendText(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, const osgDB::ReaderWriter::Options* options);
|
||||
static osg::Node * appendText(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, const osgDB::Options* options);
|
||||
private:
|
||||
class UpdateCallback;
|
||||
};
|
||||
|
@ -410,7 +410,7 @@ SGAnimation::~SGAnimation()
|
||||
bool
|
||||
SGAnimation::animate(osg::Node* node, const SGPropertyNode* configNode,
|
||||
SGPropertyNode* modelRoot,
|
||||
const osgDB::ReaderWriter::Options* options)
|
||||
const osgDB::Options* options)
|
||||
{
|
||||
std::string type = configNode->getStringValue("type", "none");
|
||||
if (type == "alpha-test") {
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
|
||||
static bool animate(osg::Node* node, const SGPropertyNode* configNode,
|
||||
SGPropertyNode* modelRoot,
|
||||
const osgDB::ReaderWriter::Options* options);
|
||||
const osgDB::Options* options);
|
||||
|
||||
protected:
|
||||
void apply(osg::Node* node);
|
||||
@ -321,7 +321,7 @@ class SGShaderAnimation : public SGAnimation {
|
||||
public:
|
||||
SGShaderAnimation(const SGPropertyNode* configNode,
|
||||
SGPropertyNode* modelRoot,
|
||||
const osgDB::ReaderWriter::Options* options);
|
||||
const osgDB::Options* options);
|
||||
virtual osg::Group* createAnimationGroup(osg::Group& parent);
|
||||
private:
|
||||
class UpdateCallback;
|
||||
|
@ -39,7 +39,7 @@ using std::vector;
|
||||
|
||||
osg::Texture2D*
|
||||
SGLoadTexture2D(bool staticTexture, const std::string& path,
|
||||
const osgDB::ReaderWriter::Options* options,
|
||||
const osgDB::Options* options,
|
||||
bool wrapu, bool wrapv, int)
|
||||
{
|
||||
osg::Image* image;
|
||||
|
@ -30,12 +30,12 @@ class SGReaderWriterOptions;
|
||||
|
||||
osg::Texture2D*
|
||||
SGLoadTexture2D(bool staticTexture, const std::string& path,
|
||||
const osgDB::ReaderWriter::Options* options = 0,
|
||||
const osgDB::Options* options = 0,
|
||||
bool wrapu = true, bool wrapv = true, int mipmaplevels = -1);
|
||||
|
||||
inline osg::Texture2D*
|
||||
SGLoadTexture2D(const std::string& path,
|
||||
const osgDB::ReaderWriter::Options* options = 0,
|
||||
const osgDB::Options* options = 0,
|
||||
bool wrapu = true, bool wrapv = true, int mipmaplevels = -1)
|
||||
{
|
||||
return SGLoadTexture2D(true, path, options, wrapu, wrapv, mipmaplevels);
|
||||
@ -43,7 +43,7 @@ SGLoadTexture2D(const std::string& path,
|
||||
|
||||
inline osg::Texture2D*
|
||||
SGLoadTexture2D(const SGPath& path,
|
||||
const osgDB::ReaderWriter::Options* options = 0,
|
||||
const osgDB::Options* options = 0,
|
||||
bool wrapu = true, bool wrapv = true,
|
||||
int mipmaplevels = -1)
|
||||
{
|
||||
@ -53,7 +53,7 @@ SGLoadTexture2D(const SGPath& path,
|
||||
|
||||
inline osg::Texture2D*
|
||||
SGLoadTexture2D(bool staticTexture, const SGPath& path,
|
||||
const osgDB::ReaderWriter::Options* options = 0,
|
||||
const osgDB::Options* options = 0,
|
||||
bool wrapu = true, bool wrapv = true,
|
||||
int mipmaplevels = -1)
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ void SGModelLib::setPanelFunc(panel_func pf)
|
||||
}
|
||||
|
||||
std::string SGModelLib::findDataFile(const std::string& file,
|
||||
const osgDB::ReaderWriter::Options* opts,
|
||||
const osgDB::Options* opts,
|
||||
SGPath currentPath)
|
||||
{
|
||||
if (file.empty())
|
||||
@ -141,9 +141,9 @@ SGModelLib::loadDeferredModel(const string &path, SGPropertyNode *prop_root,
|
||||
if (SGPath(path).lower_extension() == "ac")
|
||||
opt->setInstantiateEffects(true);
|
||||
if (!prop_root || prop_root->getBoolValue("/sim/rendering/cache", true))
|
||||
opt->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_ALL);
|
||||
opt->setObjectCacheHint(osgDB::Options::CACHE_ALL);
|
||||
else
|
||||
opt->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_NONE);
|
||||
opt->setObjectCacheHint(osgDB::Options::CACHE_NONE);
|
||||
proxyNode->setDatabaseOptions(opt.get());
|
||||
|
||||
return proxyNode;
|
||||
@ -167,9 +167,9 @@ SGModelLib::loadPagedModel(const string &path, SGPropertyNode *prop_root,
|
||||
if (SGPath(path).lower_extension() == "ac")
|
||||
opt->setInstantiateEffects(true);
|
||||
if (!prop_root || prop_root->getBoolValue("/sim/rendering/cache", true))
|
||||
opt->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_ALL);
|
||||
opt->setObjectCacheHint(osgDB::Options::CACHE_ALL);
|
||||
else
|
||||
opt->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_NONE);
|
||||
opt->setObjectCacheHint(osgDB::Options::CACHE_NONE);
|
||||
plod->setDatabaseOptions(opt.get());
|
||||
return plod;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
SGModelData *data=0);
|
||||
|
||||
static std::string findDataFile(const std::string& file,
|
||||
const osgDB::ReaderWriter::Options* opts = NULL,
|
||||
const osgDB::Options* opts = NULL,
|
||||
SGPath currentDir = SGPath());
|
||||
protected:
|
||||
SGModelLib();
|
||||
|
@ -135,7 +135,7 @@ void transformParticles(osgParticle::ParticleSystem* particleSys,
|
||||
|
||||
osg::Group * Particles::appendParticles(const SGPropertyNode* configNode,
|
||||
SGPropertyNode* modelRoot,
|
||||
const osgDB::ReaderWriter::Options*
|
||||
const osgDB::Options*
|
||||
options)
|
||||
{
|
||||
SG_LOG(SG_GENERAL, SG_DEBUG, "Setting up a particle system!\n");
|
||||
|
@ -111,7 +111,7 @@ class Particles : public osg::NodeCallback
|
||||
public:
|
||||
Particles();
|
||||
|
||||
static osg::Group * appendParticles(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, const osgDB::ReaderWriter::Options* options);
|
||||
static osg::Group * appendParticles(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, const osgDB::Options* options);
|
||||
|
||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
|
||||
|
||||
|
@ -187,7 +187,7 @@ static void create_specular_highlights(osg::Node *node)
|
||||
|
||||
SGShaderAnimation::SGShaderAnimation(const SGPropertyNode* configNode,
|
||||
SGPropertyNode* modelRoot,
|
||||
const osgDB::ReaderWriter::Options*
|
||||
const osgDB::Options*
|
||||
options) :
|
||||
SGAnimation(configNode, modelRoot)
|
||||
{
|
||||
|
@ -94,7 +94,7 @@ SGMakeState(const SGPath &path, const char* colorTexture,
|
||||
{
|
||||
osg::StateSet *stateSet = new osg::StateSet;
|
||||
|
||||
osg::ref_ptr<osgDB::ReaderWriter::Options> options
|
||||
osg::ref_ptr<osgDB::Options> options
|
||||
= makeOptionsFromPath(path);
|
||||
stateSet->setTextureAttribute(0, SGLoadTexture2D(colorTexture,
|
||||
options.get()));
|
||||
|
@ -78,7 +78,7 @@ SGMoon::build( SGPath path, double moon_size ) {
|
||||
stateSet->setRenderBinDetails(-5, "RenderBin");
|
||||
|
||||
// set up the orb state
|
||||
osg::ref_ptr<osgDB::ReaderWriter::Options> options
|
||||
osg::ref_ptr<osgDB::Options> options
|
||||
= makeOptionsFromPath(path);
|
||||
|
||||
osg::Texture2D* texture = SGLoadTexture2D("moon.png", options.get());
|
||||
|
@ -110,7 +110,7 @@ SGNewCloud::SGNewCloud(const SGPath &texture_root, const SGPropertyNode *cld_def
|
||||
"texture"),
|
||||
"image"),
|
||||
texture);
|
||||
ref_ptr<osgDB::ReaderWriter::Options> options
|
||||
ref_ptr<osgDB::Options> options
|
||||
= makeOptionsFromPath(texture_root);
|
||||
ref_ptr<SGReaderWriterOptions> sgOptions
|
||||
= new SGReaderWriterOptions(*options.get());
|
||||
|
@ -69,7 +69,7 @@ SGSun::build( SGPath path, double sun_size, SGPropertyNode *property_tree_Node )
|
||||
|
||||
env_node = property_tree_Node;
|
||||
|
||||
osg::ref_ptr<osgDB::ReaderWriter::Options> options
|
||||
osg::ref_ptr<osgDB::Options> options
|
||||
= makeOptionsFromPath(path);
|
||||
// build the ssg scene graph sub tree for the sky and connected
|
||||
// into the provide scene graph branch
|
||||
|
@ -54,7 +54,7 @@ const char* ReaderWriterSTG::className() const
|
||||
|
||||
osgDB::ReaderWriter::ReadResult
|
||||
ReaderWriterSTG::readNode(const std::string& fileName,
|
||||
const osgDB::ReaderWriter::Options* options) const
|
||||
const osgDB::Options* options) const
|
||||
{
|
||||
osg::Node* result = TileEntry::loadTileByFileName(fileName, options);
|
||||
// For debugging race conditions
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
virtual const char* className() const;
|
||||
|
||||
virtual ReadResult readNode(const std::string& fileName,
|
||||
const osgDB::ReaderWriter::Options* options)
|
||||
const osgDB::Options* options)
|
||||
const;
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,7 @@ SGReaderWriterBTG::acceptsExtension(const std::string& extension) const
|
||||
|
||||
osgDB::ReaderWriter::ReadResult
|
||||
SGReaderWriterBTG::readNode(const std::string& fileName,
|
||||
const osgDB::ReaderWriter::Options* options) const
|
||||
const osgDB::Options* options) const
|
||||
{
|
||||
const SGReaderWriterOptions* sgOptions;
|
||||
sgOptions = dynamic_cast<const SGReaderWriterOptions*>(options);
|
||||
|
@ -30,7 +30,7 @@ public:
|
||||
|
||||
virtual bool acceptsExtension(const std::string& /*extension*/) const;
|
||||
virtual ReadResult readNode(const std::string& fileName,
|
||||
const osgDB::ReaderWriter::Options* options)
|
||||
const osgDB::Options* options)
|
||||
const;
|
||||
};
|
||||
|
||||
|
@ -131,7 +131,7 @@ void TileEntry::prep_ssg_node(float vis) {
|
||||
}
|
||||
|
||||
bool TileEntry::obj_load(const string& path, osg::Group *geometry, bool is_base,
|
||||
const osgDB::ReaderWriter::Options* options)
|
||||
const osgDB::Options* options)
|
||||
{
|
||||
osg::Node* node = osgDB::readNodeFile(path, options);
|
||||
if (node)
|
||||
@ -178,7 +178,7 @@ struct Object {
|
||||
|
||||
osg::Node*
|
||||
TileEntry::loadTileByFileName(const string& fileName,
|
||||
const osgDB::ReaderWriter::Options* options)
|
||||
const osgDB::Options* options)
|
||||
{
|
||||
std::string index_str = osgDB::getNameLessExtension(fileName);
|
||||
index_str = osgDB::getSimpleFileName(index_str);
|
||||
|
@ -71,7 +71,7 @@ private:
|
||||
static bool obj_load( const std::string& path,
|
||||
osg::Group* geometry,
|
||||
bool is_base,
|
||||
const osgDB::ReaderWriter::Options* options);
|
||||
const osgDB::Options* options);
|
||||
|
||||
/**
|
||||
* This value is used by the tile scheduler/loader to load tiles
|
||||
@ -106,7 +106,7 @@ public:
|
||||
* Transition to OSG database pager
|
||||
*/
|
||||
static osg::Node* loadTileByFileName(const std::string& index_str,
|
||||
const osgDB::ReaderWriter::Options*);
|
||||
const osgDB::Options*);
|
||||
/**
|
||||
* Return true if the tile entry is loaded, otherwise return false
|
||||
* indicating that the loading thread is still working on this.
|
||||
|
@ -27,11 +27,11 @@
|
||||
|
||||
using namespace simgear;
|
||||
|
||||
osgDB::ReaderWriter::Options* simgear::makeOptionsFromPath(const SGPath& path)
|
||||
osgDB::Options* simgear::makeOptionsFromPath(const SGPath& path)
|
||||
{
|
||||
using namespace osgDB;
|
||||
ReaderWriter::Options *options
|
||||
= new ReaderWriter::Options(*(Registry::instance()->getOptions()));
|
||||
Options *options
|
||||
= new Options(*(Registry::instance()->getOptions()));
|
||||
options->setDatabasePath(path.str());
|
||||
return options;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
namespace simgear
|
||||
{
|
||||
osgDB::ReaderWriter::Options* makeOptionsFromPath(const SGPath&);
|
||||
osgDB::Options* makeOptionsFromPath(const SGPath&);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
_instantiateEffects(false)
|
||||
{ }
|
||||
SGReaderWriterOptions(const std::string& str) :
|
||||
osgDB::ReaderWriter::Options(str),
|
||||
osgDB::Options(str),
|
||||
_materialLib(0),
|
||||
_load_panel(0),
|
||||
_model_data(0),
|
||||
@ -47,7 +47,7 @@ public:
|
||||
{ }
|
||||
SGReaderWriterOptions(const osgDB::Options& options,
|
||||
const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) :
|
||||
osgDB::ReaderWriter::Options(options, copyop),
|
||||
osgDB::Options(options, copyop),
|
||||
_materialLib(0),
|
||||
_load_panel(0),
|
||||
_model_data(0),
|
||||
@ -55,7 +55,7 @@ public:
|
||||
{ }
|
||||
SGReaderWriterOptions(const SGReaderWriterOptions& options,
|
||||
const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) :
|
||||
osgDB::ReaderWriter::Options(options, copyop),
|
||||
osgDB::Options(options, copyop),
|
||||
_propertyNode(options._propertyNode),
|
||||
_materialLib(options._materialLib),
|
||||
_load_panel(options._load_panel),
|
||||
|
Loading…
Reference in New Issue
Block a user