From: Mathias Froehlich Date: Sun, 4 Mar 2012 19:10:22 +0000 (+0100) Subject: spt: Make use of newly provided earth texture. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9700e46e47f1e6413d824b6bd6b41027506b91ca;p=simgear.git spt: Make use of newly provided earth texture. --- diff --git a/simgear/scene/tgdb/ReaderWriterSPT.cxx b/simgear/scene/tgdb/ReaderWriterSPT.cxx index f2c88ecf..88995f59 100644 --- a/simgear/scene/tgdb/ReaderWriterSPT.cxx +++ b/simgear/scene/tgdb/ReaderWriterSPT.cxx @@ -67,6 +67,12 @@ ReaderWriterSPT::readObject(const std::string& fileName, const osgDB::Options* o stateSet->setAttributeAndModes(new osg::CullFace); std::string imageFileName = options->getPluginStringData("SimGear::FG_WORLD_TEXTURE"); + if (imageFileName.empty()) { + imageFileName = options->getPluginStringData("SimGear::FG_ROOT"); + imageFileName = osgDB::concatPaths(imageFileName, "Textures"); + imageFileName = osgDB::concatPaths(imageFileName, "Globe"); + imageFileName = osgDB::concatPaths(imageFileName, "world.topo.bathy.200407.3x4096x2048.png"); + } if (osg::Image* image = osgDB::readImageFile(imageFileName, options)) { osg::Texture2D* texture = new osg::Texture2D; texture->setImage(image);