Reorginized the TerrainTile/TerrainTechnique dirty mechanism so that TerrainTile
now holds the dirty flag and enables/disables event traversal in response dirty being set/unset. This allows terrain to be automatically updated in response to Terrain scale and sample ratio changes.
This commit is contained in:
@@ -79,14 +79,7 @@ void Terrain::dirtyRegisteredTiles()
|
||||
itr != _terrainTileSet.end();
|
||||
++itr)
|
||||
{
|
||||
TerrainTechnique* tt = const_cast<TerrainTile*>(*itr)->getTerrainTechnique();
|
||||
if(tt)
|
||||
{
|
||||
tt->dirty();
|
||||
|
||||
// Force recreation of Geometry
|
||||
// const_cast<TerrainTile*>(*itr)->init();
|
||||
}
|
||||
(const_cast<TerrainTile*>(*itr))->setDirty(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user