Browse Source

simplify pstats a bit; make qpgeom egg loader behave more like traditional

David Rose 20 years ago
parent
commit
f0e276fadd

+ 2 - 4
panda/src/egg2pg/characterMaker.cxx

@@ -168,14 +168,12 @@ part_to_node(PartGroup *part, const string &name) const {
     // GeomNode.  Look for a child of this node.  If it doesn't have a
     // GeomNode.  Look for a child of this node.  If it doesn't have a
     // child yet, add a GeomNode and return it.  Otherwise, if it
     // child yet, add a GeomNode and return it.  Otherwise, if it
     // already has a child, return that.
     // already has a child, return that.
-    if (node->is_geom_node() && 
-        (name.empty() || node->get_name() == name)) {
+    if (node->is_geom_node() && node->get_name() == name) {
       return node;
       return node;
     }
     }
     for (int i = 0; i < node->get_num_children(); i++) {
     for (int i = 0; i < node->get_num_children(); i++) {
       PandaNode *child = node->get_child(i);
       PandaNode *child = node->get_child(i);
-      if (child->is_geom_node() && 
-          (name.empty() || child->get_name() == name)) {
+      if (child->is_geom_node() && child->get_name() == name) {
         return child;
         return child;
       }
       }
     }
     }

+ 1 - 1
panda/src/pgraph/cullBin.cxx

@@ -18,7 +18,7 @@
 
 
 #include "cullBin.h"
 #include "cullBin.h"
 
 
-PStatCollector CullBin::_cull_bin_pcollector("Cull:Bins");
+PStatCollector CullBin::_cull_bin_pcollector("Cull:Sort");
 PStatCollector CullBin::_draw_bin_pcollector("Draw:Bins");
 PStatCollector CullBin::_draw_bin_pcollector("Draw:Bins");
 
 
 TypeHandle CullBin::_type_handle;
 TypeHandle CullBin::_type_handle;

+ 3 - 1
panda/src/pgraph/sceneGraphReducer.cxx

@@ -306,7 +306,9 @@ r_flatten(PandaNode *grandparent_node, PandaNode *parent_node,
       for (int i = parent_node->get_num_children() - 1; i >= 0; --i) {
       for (int i = parent_node->get_num_children() - 1; i >= 0; --i) {
         PandaNode *child_node = parent_node->get_child(i);
         PandaNode *child_node = parent_node->get_child(i);
         if (child_node->is_exact_type(PandaNode::get_class_type()) &&
         if (child_node->is_exact_type(PandaNode::get_class_type()) &&
-            child_node->get_num_children() == 0) {
+            child_node->get_num_children() == 0 &&
+            child_node->get_transform()->is_identity() &&
+            child_node->get_effects()->is_empty()) {
           parent_node->remove_child(child_node);
           parent_node->remove_child(child_node);
           ++num_nodes;
           ++num_nodes;
         }
         }

+ 11 - 11
panda/src/pstatclient/pStatProperties.cxx

@@ -125,12 +125,12 @@ static TimeCollectorProperties time_properties[] = {
   { 1, "Cull",                             { 0.0, 1.0, 0.0 },  1.0 / 30.0 },
   { 1, "Cull",                             { 0.0, 1.0, 0.0 },  1.0 / 30.0 },
   { 1, "Cull:Animate vertices",            { 1.0, 0.5, 0.3 },  1.0 / 30.0 },
   { 1, "Cull:Animate vertices",            { 1.0, 0.5, 0.3 },  1.0 / 30.0 },
   { 1, "Cull:Show fps",                    { 0.5, 0.8, 1.0 } },
   { 1, "Cull:Show fps",                    { 0.5, 0.8, 1.0 } },
-  { 1, "Cull:Bins",                        { 0.3, 0.6, 0.3 } },
-  { 1, "Cull:Munge",                       { 0.3, 0.3, 0.9 } },
-  { 1, "Cull:Munge:Points",                { 0.2, 0.8, 0.4 } },
-  { 1, "Cull:Munge:Data",                  { 0.7, 0.5, 0.2 } },
-  { 1, "Cull:Munge:Rotate",                { 0.9, 0.8, 0.5 } },
-  { 1, "Cull:Munge:Decompose",             { 0.1, 0.3, 0.1 } },
+  { 1, "Cull:Sort",                        { 0.3, 0.6, 0.3 } },
+  { 0, "Cull:Munge",                       { 0.3, 0.3, 0.9 } },
+  { 0, "Cull:Munge:Points",                { 0.2, 0.8, 0.4 } },
+  { 0, "Cull:Munge:Data",                  { 0.7, 0.5, 0.2 } },
+  { 0, "Cull:Munge:Rotate",                { 0.9, 0.8, 0.5 } },
+  { 0, "Cull:Munge:Decompose",             { 0.1, 0.3, 0.1 } },
   { 1, "Draw",                             { 1.0, 0.0, 0.0 },  1.0 / 30.0 },
   { 1, "Draw",                             { 1.0, 0.0, 0.0 },  1.0 / 30.0 },
   { 1, "Draw:Make current",                { 0.4, 0.2, 0.6 } },
   { 1, "Draw:Make current",                { 0.4, 0.2, 0.6 } },
   { 1, "Draw:Copy texture",                { 0.2, 0.6, 0.4 } },
   { 1, "Draw:Copy texture",                { 0.2, 0.6, 0.4 } },
@@ -141,11 +141,11 @@ static TimeCollectorProperties time_properties[] = {
   { 1, "Draw:Flip:Begin",                  { 0.3, 0.3, 0.9 } },
   { 1, "Draw:Flip:Begin",                  { 0.3, 0.3, 0.9 } },
   { 1, "Draw:Flip:End",                    { 0.9, 0.3, 0.6 } },
   { 1, "Draw:Flip:End",                    { 0.9, 0.3, 0.6 } },
   { 1, "Draw:Bins",                        { 0.3, 0.6, 0.0 } },
   { 1, "Draw:Bins",                        { 0.3, 0.6, 0.0 } },
-  { 1, "Draw:Transfer data",               { 0.8, 0.0, 0.6 } },
-  { 1, "Draw:Transfer data:Vertex buffer", { 0.0, 0.1, 0.9 } },
-  { 1, "Draw:Transfer data:Index buffer",  { 0.1, 0.9, 0.0 } },
-  { 1, "Draw:Transfer data:Texture",       { 0.9, 0.0, 0.1 } },
-  { 1, "Draw:Transfer data:Display lists", { 0.5, 0.0, 0.9 } },
+  { 0, "Draw:Transfer data",               { 0.8, 0.0, 0.6 } },
+  { 0, "Draw:Transfer data:Vertex buffer", { 0.0, 0.1, 0.9 } },
+  { 0, "Draw:Transfer data:Index buffer",  { 0.1, 0.9, 0.0 } },
+  { 0, "Draw:Transfer data:Texture",       { 0.9, 0.0, 0.1 } },
+  { 0, "Draw:Transfer data:Display lists", { 0.5, 0.0, 0.9 } },
   { 0, "Draw:Primitive",                   { 0.0, 0.0, 0.5 } },
   { 0, "Draw:Primitive",                   { 0.0, 0.0, 0.5 } },
   { 0, NULL }
   { 0, NULL }
 };
 };