//osg::Node *custom_obj;
SGMaterial *mat;
if (segment->hasBlock(now)) {
- mat = matlib->find("UnidirectionalTaperRed");
+ mat = matlib->find("UnidirectionalTaperRed", center);
} else {
- mat = matlib->find("UnidirectionalTaperGreen");
+ mat = matlib->find("UnidirectionalTaperGreen", center);
}
if (mat)
geode->setEffect(mat->get_effect());
//osg::Node *custom_obj;
SGMaterial *mat;
if (segment->hasBlock(now)) {
- mat = matlib->find("UnidirectionalTaperRed");
+ mat = matlib->find("UnidirectionalTaperRed", segCenter);
} else {
- mat = matlib->find("UnidirectionalTaperGreen");
+ mat = matlib->find("UnidirectionalTaperGreen", segCenter);
}
if (mat)
geode->setEffect(mat->get_effect());
//osg::Node *custom_obj;
SGMaterial *mat;
if (segments[pos]->hasBlock(now)) {
- mat = matlib->find("UnidirectionalTaperRed");
+ mat = matlib->find("UnidirectionalTaperRed", center);
} else {
- mat = matlib->find("UnidirectionalTaperGreen");
+ mat = matlib->find("UnidirectionalTaperGreen", center);
}
if (mat)
geode->setEffect(mat->get_effect());
//osg::Node *custom_obj;
SGMaterial *mat;
if (segments[k]->hasBlock(now)) {
- mat = matlib->find("UnidirectionalTaperRed");
+ mat = matlib->find("UnidirectionalTaperRed", segCenter);
} else {
- mat = matlib->find("UnidirectionalTaperGreen");
+ mat = matlib->find("UnidirectionalTaperGreen", segCenter);
}
if (mat)
geode->setEffect(mat->get_effect());
void FGTileMgr::materialLibChanged()
{
_options->setMaterialLib(globals->get_matlib());
- _options->getMaterialLib()->refreshActiveMaterials();
}
/* schedule a tile for loading, keep request for given amount of time.
}
/**
- * Update the various queues maintained by the tilemagr (private
+ * Update the various queues maintained by the tilemgr (private
* internal function, do not call directly.)
*/
void FGTileMgr::update_queues(bool& isDownloadingScenery)
TileEntry *e;
int loading=0;
int sz=0;
- bool didRefreshMaterialCache = false;
tile_cache.set_current_time( current_time );
tile_cache.reset_traversal();
e->prep_ssg_node(vis);
if (!e->is_loaded()) {
- if (!didRefreshMaterialCache) {
- didRefreshMaterialCache = true;
- globals->get_matlib()->refreshActiveMaterials();
- }
-
bool nonExpiredOrCurrent = !e->is_expired(current_time) || e->is_current_view();
bool downloading = isTileDirSyncing(e->tileFileName);
isDownloadingScenery |= downloading;
SG_LOG(SG_GENERAL, SG_ALERT, "Problems loading FlightGear materials.\n"
<< "Probably FG_ROOT is not properly set.");
}
- ml->refreshActiveMaterials();
simgear::SGModelLib::init(fg_root, props);
// Set up the reader/writer options