]> git.mxchange.org Git - simgear.git/commitdiff
spt: Make use of newly provided earth texture.
authorMathias Froehlich <Mathias.Froehlich@web.de>
Sun, 4 Mar 2012 19:10:22 +0000 (20:10 +0100)
committerMathias Froehlich <Mathias.Froehlich@web.de>
Sun, 4 Mar 2012 19:10:22 +0000 (20:10 +0100)
simgear/scene/tgdb/ReaderWriterSPT.cxx

index f2c88ecfc212792b84fc8a97521ebf166bb97648..88995f59abeabe51306a7624d349674f625942ce 100644 (file)
@@ -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);