1
0
Fork 0

Frederic Bouvier:

Add a static function that will be installed as a callback to
  cull or not the terrain leaves in tiles.
  Add a function to set the filter.
This commit is contained in:
ehofman 2004-04-02 14:42:42 +00:00
parent c98daef926
commit b34f0711c4
2 changed files with 19 additions and 0 deletions

View file

@ -55,6 +55,7 @@ queue<FGDeferredModel *> FGTileMgr::model_queue;
#endif // ENABLE_THREADS
queue<FGTileEntry *> FGTileMgr::delete_queue;
bool FGTileMgr::tile_filter = true;
// Constructor
FGTileMgr::FGTileMgr():
@ -512,3 +513,13 @@ void FGTileMgr::prep_ssg_nodes( SGLocation *location, float vis ) {
}
}
bool FGTileMgr::set_tile_filter( bool f ) {
bool old = tile_filter;
tile_filter = f;
return old;
}
int FGTileMgr::tile_filter_cb( ssgEntity *, int )
{
return tile_filter;
}

View file

@ -128,6 +128,11 @@ private:
#endif // ENABLE_THREADS
static queue<FGTileEntry *> delete_queue;
/**
* Tile filter indicator, to implement multipass rendering
*/
static bool tile_filter;
public:
/**
@ -188,6 +193,9 @@ public:
inline SGBucket get_current_bucket () { return current_bucket; }
inline SGBucket get_previous_bucket () { return previous_bucket; }
static bool set_tile_filter( bool f );
static int tile_filter_cb( ssgEntity *, int );
};