]> git.mxchange.org Git - flightgear.git/commitdiff
Frederic Bouvier:
authorehofman <ehofman>
Fri, 2 Apr 2004 14:42:42 +0000 (14:42 +0000)
committerehofman <ehofman>
Fri, 2 Apr 2004 14:42:42 +0000 (14:42 +0000)
  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.

src/Scenery/tilemgr.cxx
src/Scenery/tilemgr.hxx

index d05947fd492eaf309f7750b404f7875ddd1767f9..ea5b4b2fcebcdf0ea35b64c660685eadc99c610a 100644 (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;
+}
index f0d3969cbace649ddb3c3ef36f544d003ee9f9d0..b5bd427a41cffb7afba2c332b2762a2c2c3f2c8b 100644 (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 );
 };