[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26603] branches/render25/source/blender/ render/intern: Render Branch: make the raycounter code work again, broke it in refactoring.
Brecht Van Lommel
brecht at blender.org
Thu Feb 4 17:53:40 CET 2010
Revision: 26603
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26603
Author: blendix
Date: 2010-02-04 17:53:39 +0100 (Thu, 04 Feb 2010)
Log Message:
-----------
Render Branch: make the raycounter code work again, broke it in refactoring.
Modified Paths:
--------------
branches/render25/source/blender/render/intern/include/raycounter.h
branches/render25/source/blender/render/intern/raytrace/rayobject_raycounter.cpp
branches/render25/source/blender/render/intern/source/rayshade.c
branches/render25/source/blender/render/intern/source/shadeinput.c
Modified: branches/render25/source/blender/render/intern/include/raycounter.h
===================================================================
--- branches/render25/source/blender/render/intern/include/raycounter.h 2010-02-04 16:35:22 UTC (rev 26602)
+++ branches/render25/source/blender/render/intern/include/raycounter.h 2010-02-04 16:53:39 UTC (rev 26603)
@@ -31,11 +31,14 @@
#include "RE_raytrace.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
#ifdef RE_RAYCOUNTER
/* #define RE_RC_INIT(isec, shi) (isec).count = re_rc_counter+(shi).thread */
-#define RE_RC_INIT(isec, shi) (isec).raycounter = &((shi).raycounter)
+#define RE_RC_INIT(isec, shi) (isec).raycounter = &((shi).shading.raycounter)
void RE_RC_INFO (RayCounter *rc);
void RE_RC_MERGE(RayCounter *rc, RayCounter *tmp);
#define RE_RC_COUNT(var) (var)++
@@ -51,5 +54,8 @@
#endif
+#ifdef __cplusplus
+}
+#endif
#endif
Modified: branches/render25/source/blender/render/intern/raytrace/rayobject_raycounter.cpp
===================================================================
--- branches/render25/source/blender/render/intern/raytrace/rayobject_raycounter.cpp 2010-02-04 16:35:22 UTC (rev 26602)
+++ branches/render25/source/blender/render/intern/raytrace/rayobject_raycounter.cpp 2010-02-04 16:53:39 UTC (rev 26603)
@@ -26,6 +26,9 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
+
+#include "RE_raytrace.h"
+
#include "rayobject.h"
#include "raycounter.h"
Modified: branches/render25/source/blender/render/intern/source/rayshade.c
===================================================================
--- branches/render25/source/blender/render/intern/source/rayshade.c 2010-02-04 16:35:22 UTC (rev 26602)
+++ branches/render25/source/blender/render/intern/source/rayshade.c 2010-02-04 16:53:39 UTC (rev 26603)
@@ -847,7 +847,7 @@
else {
ray_fadeout_endcolor(re, col, origshi, &shi, origshr, &isec, vec);
}
- RE_RC_MERGE(&origshi->material.raycounter, &shi.shading.raycounter);
+ RE_RC_MERGE(&origshi->shading.raycounter, &shi.shading.raycounter);
}
static int adaptive_sample_variance(int samples, float *col, float *colsq, float thresh)
@@ -1242,7 +1242,7 @@
ray_trace_shadow_tra(re, is, origshi, depth-1, traflag | RAY_TRA);
}
- RE_RC_MERGE(&origshi->material.raycounter, &shi.raycounter);
+ RE_RC_MERGE(&origshi->shading.raycounter, &shi.shading.raycounter);
}
}
Modified: branches/render25/source/blender/render/intern/source/shadeinput.c
===================================================================
--- branches/render25/source/blender/render/intern/source/shadeinput.c 2010-02-04 16:35:22 UTC (rev 26602)
+++ branches/render25/source/blender/render/intern/source/shadeinput.c 2010-02-04 16:53:39 UTC (rev 26603)
@@ -1421,7 +1421,7 @@
{
/* ------ main shading loop -------- */
#ifdef RE_RAYCOUNTER
- memset(&shi->material.raycounter, 0, sizeof(shi->material.raycounter));
+ memset(&shi->shading.raycounter, 0, sizeof(shi->shading.raycounter));
#endif
if(shi->material.mat->nodetree && shi->material.mat->use_nodes) {
@@ -1465,12 +1465,12 @@
/*
if(1 || shi->shading.passflag & SCE_PASS_RAYHITS)
{
- shr->rayhits[0] = (float)shi->material.raycounter.faces.test;
- shr->rayhits[1] = (float)shi->material.raycounter.bb.hit;
+ shr->rayhits[0] = (float)shi->shading.raycounter.faces.test;
+ shr->rayhits[1] = (float)shi->shading.raycounter.bb.hit;
shr->rayhits[2] = 0.0;
shr->rayhits[3] = 1.0;
}
*/
- RE_RC_MERGE(&re_rc_counter[shi->shading.thread], &shi->material.raycounter);
+ RE_RC_MERGE(&re_rc_counter[shi->shading.thread], &shi->shading.raycounter);
}
More information about the Bf-blender-cvs
mailing list