Browse Source

*** empty log message ***

David Rose 25 years ago
parent
commit
5aca97ac9b
2 changed files with 9 additions and 11 deletions
  1. 8 10
      panda/src/cull/cullTraverser.cxx
  2. 1 1
      panda/src/cull/geomBinNormal.cxx

+ 8 - 10
panda/src/cull/cullTraverser.cxx

@@ -245,15 +245,18 @@ traverse(Node *root,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CullTraverser::
 void CullTraverser::
 setup_initial_bins() {
 setup_initial_bins() {
-  // We always have "default" and "fixed" hardcoded in, although these
-  // may be overridden by specifing a new bin with the same name in
-  // the Configrc file.
+  // We always have "default", "background", and "fixed" hardcoded in,
+  // although these may be overridden by specifing a new bin with the
+  // same name in the Configrc file.
 
 
   GeomBinNormal *default_bin = new GeomBinNormal("default");
   GeomBinNormal *default_bin = new GeomBinNormal("default");
+  GeomBinFixed *background = new GeomBinFixed("background");
   GeomBinFixed *fixed = new GeomBinFixed("fixed");
   GeomBinFixed *fixed = new GeomBinFixed("fixed");
-  fixed->set_sort(30);
+  background->set_sort(20);
+  fixed->set_sort(40);
 
 
   default_bin->set_traverser(this);
   default_bin->set_traverser(this);
+  background->set_traverser(this);
   fixed->set_traverser(this);
   fixed->set_traverser(this);
 
 
 
 
@@ -354,12 +357,7 @@ draw() {
 	cull_cat.warning()
 	cull_cat.warning()
 	  << "Bin " << bin_name << " is unknown; creating a default bin.\n";
 	  << "Bin " << bin_name << " is unknown; creating a default bin.\n";
 
 
-	if (bin_name == "fixed") {
-	  requested_bin = new GeomBinFixed(bin_name);
-	  requested_bin->set_sort(20);
-	} else {
-	  requested_bin = new GeomBinNormal(bin_name);
-	}
+	requested_bin = new GeomBinNormal(bin_name);
 	requested_bin->set_traverser(this);
 	requested_bin->set_traverser(this);
       }
       }
 
 

+ 1 - 1
panda/src/cull/geomBinNormal.cxx

@@ -25,7 +25,7 @@ GeomBinNormal(const string &name) :
   GeomBinUnsorted *opaque = new GeomBinUnsorted("opaque");
   GeomBinUnsorted *opaque = new GeomBinUnsorted("opaque");
   GeomBinBackToFront *transparent = new GeomBinBackToFront("transparent");
   GeomBinBackToFront *transparent = new GeomBinBackToFront("transparent");
   opaque->set_sort(10);
   opaque->set_sort(10);
-  transparent->set_sort(20);
+  transparent->set_sort(30);
 
 
   add_sub_bin(opaque);
   add_sub_bin(opaque);
   add_sub_bin(transparent);
   add_sub_bin(transparent);