From f0e276faddb44414be8e5694f4ee104c06767ab5 Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 25 Apr 2005 22:23:18 +0000 Subject: [PATCH] simplify pstats a bit; make qpgeom egg loader behave more like traditional --- panda/src/egg2pg/characterMaker.cxx | 6 ++---- panda/src/pgraph/cullBin.cxx | 2 +- panda/src/pgraph/sceneGraphReducer.cxx | 4 +++- panda/src/pstatclient/pStatProperties.cxx | 22 +++++++++++----------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/panda/src/egg2pg/characterMaker.cxx b/panda/src/egg2pg/characterMaker.cxx index 8f4aa88511..9f8b84c331 100644 --- a/panda/src/egg2pg/characterMaker.cxx +++ b/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 // child yet, add a GeomNode and return it. Otherwise, if it // 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; } for (int i = 0; i < node->get_num_children(); 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; } } diff --git a/panda/src/pgraph/cullBin.cxx b/panda/src/pgraph/cullBin.cxx index 004b04b678..d8eb269752 100644 --- a/panda/src/pgraph/cullBin.cxx +++ b/panda/src/pgraph/cullBin.cxx @@ -18,7 +18,7 @@ #include "cullBin.h" -PStatCollector CullBin::_cull_bin_pcollector("Cull:Bins"); +PStatCollector CullBin::_cull_bin_pcollector("Cull:Sort"); PStatCollector CullBin::_draw_bin_pcollector("Draw:Bins"); TypeHandle CullBin::_type_handle; diff --git a/panda/src/pgraph/sceneGraphReducer.cxx b/panda/src/pgraph/sceneGraphReducer.cxx index 45763757e7..f8bb863cdd 100644 --- a/panda/src/pgraph/sceneGraphReducer.cxx +++ b/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) { PandaNode *child_node = parent_node->get_child(i); 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); ++num_nodes; } diff --git a/panda/src/pstatclient/pStatProperties.cxx b/panda/src/pstatclient/pStatProperties.cxx index 71911ff832..a99750bc5f 100644 --- a/panda/src/pstatclient/pStatProperties.cxx +++ b/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:Animate vertices", { 1.0, 0.5, 0.3 }, 1.0 / 30.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:Make current", { 0.4, 0.2, 0.6 } }, { 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:End", { 0.9, 0.3, 0.6 } }, { 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, NULL } };