diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-12 22:45:01 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-12 22:45:01 +0300 |
commit | 6a0308aad332137c0b6f22152a439ca0f73914da (patch) | |
tree | 821692dc6ebdefb806106dd58d9fb5be87072169 /source/blender/render/intern/raytrace/svbvh.h | |
parent | 000dcc7ad767511baec0e88b4e88b24c5667ef7e (diff) |
Raytrace: only print debug info when running with -d option.
Diffstat (limited to 'source/blender/render/intern/raytrace/svbvh.h')
-rw-r--r-- | source/blender/render/intern/raytrace/svbvh.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/render/intern/raytrace/svbvh.h b/source/blender/render/intern/raytrace/svbvh.h index 80e6e2ea190..873f44d6d66 100644 --- a/source/blender/render/intern/raytrace/svbvh.h +++ b/source/blender/render/intern/raytrace/svbvh.h @@ -33,6 +33,7 @@ #include "bvh.h" #include "BLI_memarena.h" +#include "BKE_global.h" #include <stdio.h> #include <algorithm> @@ -142,10 +143,12 @@ struct Reorganize_SVBVH ~Reorganize_SVBVH() { - printf("%f childs per node\n", childs_per_node / nodes); - printf("%d childs BB are useless\n", useless_bb); - for(int i=0; i<16; i++) - printf("%i childs per node: %d/%d = %f\n", i, nodes_with_childs[i], nodes, nodes_with_childs[i]/float(nodes)); + if(G.f & G_DEBUG) { + printf("%f childs per node\n", childs_per_node / nodes); + printf("%d childs BB are useless\n", useless_bb); + for(int i=0; i<16; i++) + printf("%i childs per node: %d/%d = %f\n", i, nodes_with_childs[i], nodes, nodes_with_childs[i]/float(nodes)); + } } SVBVHNode *create_node(int nchilds) |