[Bf-blender-cvs] [7f2b8e7] master: Use const qualifier in do_sky_tex

Sergey Sharybin noreply at git.blender.org
Wed Jan 13 09:18:59 CET 2016


Commit: 7f2b8e78b62968f2aafc3285e0f0e3f199376701
Author: Sergey Sharybin
Date:   Wed Jan 13 13:18:41 2016 +0500
Branches: master
https://developer.blender.org/rB7f2b8e78b62968f2aafc3285e0f0e3f199376701

Use const qualifier in do_sky_tex

Will be needed for D1729.

===================================================================

M	source/blender/render/intern/include/texture.h
M	source/blender/render/intern/source/render_texture.c

===================================================================

diff --git a/source/blender/render/intern/include/texture.h b/source/blender/render/intern/include/texture.h
index ed161e1..1141449 100644
--- a/source/blender/render/intern/include/texture.h
+++ b/source/blender/render/intern/include/texture.h
@@ -74,7 +74,7 @@ struct ImagePool;
 /* texture.h */
 
 void do_halo_tex(struct HaloRen *har, float xn, float yn, float col_r[4]);
-void do_sky_tex(const float rco[3], float lo[3], const float dxyview[2], float hor[3], float zen[3], float *blend, int skyflag, short thread);
+void do_sky_tex(const float rco[3], const float lo[3], const float dxyview[2], float hor[3], float zen[3], float *blend, int skyflag, short thread);
 void do_material_tex(struct ShadeInput *shi, struct Render *re);
 void do_lamp_tex(LampRen *la, const float lavec[3], struct ShadeInput *shi, float col_r[3], int effect);
 void do_volume_tex(struct ShadeInput *shi, const float xyz[3], int mapto_flag, float col_r[3], float *val, struct Render *re);
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index 87a3482..f781d11 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -3014,13 +3014,14 @@ void do_halo_tex(HaloRen *har, float xn, float yn, float col_r[4])
 /* ------------------------------------------------------------------------- */
 
 /* hor and zen are RGB vectors, blend is 1 float, should all be initialized */
-void do_sky_tex(const float rco[3], float lo[3], const float dxyview[2], float hor[3], float zen[3], float *blend, int skyflag, short thread)
+void do_sky_tex(const float rco[3], const float lo[3], const float dxyview[2], float hor[3], float zen[3], float *blend, int skyflag, short thread)
 {
 	const bool skip_load_image = (R.r.scemode & R_NO_IMAGE_LOAD) != 0;
 	MTex *mtex;
 	Tex *tex;
 	TexResult texres= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
-	float *co, fact, stencilTin=1.0;
+	const float *co;
+	float fact, stencilTin=1.0;
 	float tempvec[3], texvec[3], dxt[3], dyt[3];
 	int tex_nr, rgb= 0;




More information about the Bf-blender-cvs mailing list