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

This commit is contained in:
David Rose 2005-04-25 22:23:18 +00:00
parent 4e66269371
commit f0e276fadd
4 changed files with 17 additions and 17 deletions

View File

@ -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;
}
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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 }
};