From fc35624a4fd06753cb370b9601d7fd65269ae0d0 Mon Sep 17 00:00:00 2001 From: frohlich Date: Fri, 27 Feb 2009 19:31:33 +0000 Subject: [PATCH] Use that static material function instead of the member one. Modified Files: src/FDM/groundcache.cxx src/Scenery/scenery.cxx --- src/FDM/groundcache.cxx | 2 +- src/Scenery/scenery.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FDM/groundcache.cxx b/src/FDM/groundcache.cxx index fd1893065..90e79b864 100644 --- a/src/FDM/groundcache.cxx +++ b/src/FDM/groundcache.cxx @@ -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); diff --git a/src/Scenery/scenery.cxx b/src/Scenery/scenery.cxx index 84c5b9fad..13cc67ffc 100644 --- a/src/Scenery/scenery.cxx +++ b/src/Scenery/scenery.cxx @@ -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); } } }