New materials.xml format
This commit is contained in:
parent
beedd9e683
commit
b654477794
4 changed files with 9 additions and 17 deletions
|
@ -1409,9 +1409,9 @@ void FGStartupController::render(bool visible)
|
|||
//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());
|
||||
|
@ -1487,9 +1487,9 @@ void FGStartupController::render(bool visible)
|
|||
//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());
|
||||
|
|
|
@ -1230,9 +1230,9 @@ void FGGroundNetwork::render(bool visible)
|
|||
//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());
|
||||
|
@ -1304,9 +1304,9 @@ void FGGroundNetwork::render(bool visible)
|
|||
//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());
|
||||
|
|
|
@ -199,7 +199,6 @@ void FGTileMgr::reinit()
|
|||
void FGTileMgr::materialLibChanged()
|
||||
{
|
||||
_options->setMaterialLib(globals->get_matlib());
|
||||
_options->getMaterialLib()->refreshActiveMaterials();
|
||||
}
|
||||
|
||||
/* schedule a tile for loading, keep request for given amount of time.
|
||||
|
@ -304,7 +303,7 @@ void FGTileMgr::schedule_needed(const SGBucket& curr_bucket, double vis)
|
|||
}
|
||||
|
||||
/**
|
||||
* 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)
|
||||
|
@ -316,7 +315,6 @@ 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();
|
||||
|
@ -332,11 +330,6 @@ void FGTileMgr::update_queues(bool& isDownloadingScenery)
|
|||
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;
|
||||
|
|
|
@ -188,7 +188,6 @@ main(int argc, char** argv)
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue