]> git.mxchange.org Git - flightgear.git/commitdiff
Use that static material function instead of the member one.
authorfrohlich <frohlich>
Fri, 27 Feb 2009 19:31:33 +0000 (19:31 +0000)
committerTim Moore <timoore@redhat.com>
Fri, 27 Feb 2009 22:42:34 +0000 (23:42 +0100)
Modified Files:
  src/FDM/groundcache.cxx src/Scenery/scenery.cxx

src/FDM/groundcache.cxx
src/Scenery/scenery.cxx

index fd18930650262da9d1b6684f3f6a54dbb7cce757..90e79b8643b21cbd3d70ac0d196765e26c818667 100644 (file)
@@ -201,7 +201,7 @@ void FGGroundCache::getGroundProperty(Drawable* drawable,
     gp.material = 0;
     backfaceCulling = false;
     // XXX state set might be higher up in scene graph
-    gp.material = globals->get_matlib()->findMaterial(drawable->getStateSet());
+    gp.material = SGMaterialLib::findMaterial(drawable->getStateSet());
     if (gp.material)
         gp.type = (gp.material->get_solid() ? FGInterface::Solid
                    : FGInterface::Water);
index 84c5b9fad2d2e1006c7a12e2be67d32f6f00275f..13cc67ffcadf120ee5bba41040264e703a19969d 100644 (file)
@@ -164,7 +164,7 @@ FGScenery::get_elevation_m(const SGGeod& geod, double& alt,
         alt = elevation;
         if (material) {
           const osg::StateSet* stateSet = hit.getDrawable()->getStateSet();
-          *material = globals->get_matlib()->findMaterial(stateSet);
+          *material = SGMaterialLib::findMaterial(stateSet);
         }
       }
     }