Make use of SGReaderWriterOptions::copyOrCreate in ReaderWriterSTG.

This commit is contained in:
Mathias Froehlich 2012-03-04 07:50:05 +01:00
parent 4e24095d8b
commit 72f1538ac2

View File

@ -297,13 +297,8 @@ TileEntry::loadTileByFileName(const string& fileName,
}
}
const SGReaderWriterOptions* btgOpt;
btgOpt = dynamic_cast<const SGReaderWriterOptions*>(options);
osg::ref_ptr<SGReaderWriterOptions> opt;
if (btgOpt)
opt = new SGReaderWriterOptions(*btgOpt);
else
opt = new SGReaderWriterOptions;
opt = SGReaderWriterOptions::copyOrCreate(options);
// obj_load() will generate ground lighting for us ...
osg::Group* new_tile = new osg::Group;