[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26605] branches/render25/source/blender/ render/intern/source/texture_stack.c: Render Branch: temporary workaround for extern texture access, previously this

Brecht Van Lommel brecht at blender.org
Thu Feb 4 17:55:20 CET 2010


Revision: 26605
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26605
Author:   blendix
Date:     2010-02-04 17:55:20 +0100 (Thu, 04 Feb 2010)

Log Message:
-----------
Render Branch: temporary workaround for extern texture access, previously this
was using the global R, with whatever contents it had from last render. For now
just introduce a static local R for this case.

Modified Paths:
--------------
    branches/render25/source/blender/render/intern/source/texture_stack.c

Modified: branches/render25/source/blender/render/intern/source/texture_stack.c
===================================================================
--- branches/render25/source/blender/render/intern/source/texture_stack.c	2010-02-04 16:54:25 UTC (rev 26604)
+++ branches/render25/source/blender/render/intern/source/texture_stack.c	2010-02-04 16:55:20 UTC (rev 26605)
@@ -2153,7 +2153,9 @@
 
 int multitex_thread(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexResult *texres, short thread, short which_output)
 {
-	Render *re= NULL; // this is from outside render engine 
+	/* TODO initialize re to with 0 for now, previously this would
+	   use global R, which contained settings from last render .. */
+	static Render re = {0};
 
 	if(tex==NULL) {
 		memset(texres, 0, sizeof(TexResult));
@@ -2180,12 +2182,12 @@
 			dyt_l[0]= dyt_l[1]= dyt_l[2]= 0.0f;
 		}
 
-		do_2d_mapping(re, &mtex, texvec_l, NULL, NULL, dxt_l, dyt_l);
+		do_2d_mapping(&re, &mtex, texvec_l, NULL, NULL, dxt_l, dyt_l);
 
-		return tex_sample_old(&re->params, tex, texvec_l, dxt_l, dyt_l, osatex, texres, thread, which_output);
+		return tex_sample_old(&re.params, tex, texvec_l, dxt_l, dyt_l, osatex, texres, thread, which_output);
 	}
 	else
-		return tex_sample_old(&re->params, tex, texvec, dxt, dyt, osatex, texres, thread, which_output);
+		return tex_sample_old(&re.params, tex, texvec, dxt, dyt, osatex, texres, thread, which_output);
 }
 
 int externtex(MTex *mtex, float *vec, float *tin, float *tr, float *tg, float *tb, float *ta)





More information about the Bf-blender-cvs mailing list