diff --git a/src/Scenery/tilemgr.cxx b/src/Scenery/tilemgr.cxx index d05947fd4..ea5b4b2fc 100644 --- a/src/Scenery/tilemgr.cxx +++ b/src/Scenery/tilemgr.cxx @@ -55,6 +55,7 @@ queue FGTileMgr::model_queue; #endif // ENABLE_THREADS queue 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; +} diff --git a/src/Scenery/tilemgr.hxx b/src/Scenery/tilemgr.hxx index f0d3969cb..b5bd427a4 100644 --- a/src/Scenery/tilemgr.hxx +++ b/src/Scenery/tilemgr.hxx @@ -128,6 +128,11 @@ private: #endif // ENABLE_THREADS static queue 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 ); };