Use that static material function instead of the member one.
Modified Files: src/FDM/groundcache.cxx src/Scenery/scenery.cxx
This commit is contained in:
parent
4a683bed1e
commit
fc35624a4f
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue