From 9700e46e47f1e6413d824b6bd6b41027506b91ca Mon Sep 17 00:00:00 2001 From: Mathias Froehlich Date: Sun, 4 Mar 2012 20:10:22 +0100 Subject: [PATCH] spt: Make use of newly provided earth texture. --- simgear/scene/tgdb/ReaderWriterSPT.cxx | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.39.5