Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-12 22:45:01 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-12 22:45:01 +0300
commit6a0308aad332137c0b6f22152a439ca0f73914da (patch)
tree821692dc6ebdefb806106dd58d9fb5be87072169 /source/blender/render/intern/raytrace
parent000dcc7ad767511baec0e88b4e88b24c5667ef7e (diff)
Raytrace: only print debug info when running with -d option.
Diffstat (limited to 'source/blender/render/intern/raytrace')
-rw-r--r--source/blender/render/intern/raytrace/rayobject_vbvh.cpp12
-rw-r--r--source/blender/render/intern/raytrace/reorganize.h4
-rw-r--r--source/blender/render/intern/raytrace/svbvh.h11
3 files changed, 18 insertions, 9 deletions
diff --git a/source/blender/render/intern/raytrace/rayobject_vbvh.cpp b/source/blender/render/intern/raytrace/rayobject_vbvh.cpp
index 4a2a56fa8ef..6185be324d6 100644
--- a/source/blender/render/intern/raytrace/rayobject_vbvh.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_vbvh.cpp
@@ -37,6 +37,7 @@ int tot_hints = 0;
#include "RE_raytrace.h"
#include "BLI_memarena.h"
#include "MEM_guardedalloc.h"
+#include "BKE_global.h"
#include "BKE_utildefines.h"
#include "BLI_math.h"
@@ -145,10 +146,13 @@ void bfree(VBVHTree *tree)
{
if(tot_pushup + tot_pushdown + tot_hints + tot_moves)
{
- printf("tot pushups: %d\n", tot_pushup);
- printf("tot pushdowns: %d\n", tot_pushdown);
- printf("tot moves: %d\n", tot_moves);
- printf("tot hints created: %d\n", tot_hints);
+ if(G.f & G_DEBUG) {
+ printf("tot pushups: %d\n", tot_pushup);
+ printf("tot pushdowns: %d\n", tot_pushdown);
+ printf("tot moves: %d\n", tot_moves);
+ printf("tot hints created: %d\n", tot_hints);
+ }
+
tot_pushup = 0;
tot_pushdown = 0;
tot_hints = 0;
diff --git a/source/blender/render/intern/raytrace/reorganize.h b/source/blender/render/intern/raytrace/reorganize.h
index 7b14108760a..845f53605a8 100644
--- a/source/blender/render/intern/raytrace/reorganize.h
+++ b/source/blender/render/intern/raytrace/reorganize.h
@@ -32,6 +32,8 @@
#include <vector>
#include <queue>
+#include "BKE_global.h"
+
#ifdef _WIN32
#define INFINITY FLT_MAX // in mingw math.h: (1.0F/0.0F). This generates compile error, though.
#endif
@@ -515,7 +517,7 @@ struct VBVH_optimalPackSIMD
if(num == 0) { num++; first = true; }
calc_costs(node);
- if(first) printf("expected cost = %f (%d)\n", node->cut_cost[0], node->best_cutsize );
+ if((G.f & G_DEBUG) && first) printf("expected cost = %f (%d)\n", node->cut_cost[0], node->best_cutsize );
node->optimize();
}
return node;
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)