From e16ba13251701a9845adf702e60be3f2fad724bd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 12 Sep 2011 13:00:24 +0000 Subject: use vector size and const args where possible (no functional change) --- source/blender/render/intern/include/pixelshading.h | 6 +++--- source/blender/render/intern/include/shadbuf.h | 4 ++-- source/blender/render/intern/include/shading.h | 2 +- source/blender/render/intern/include/texture.h | 12 ++++++------ source/blender/render/intern/include/volumetric.h | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) (limited to 'source/blender/render/intern/include') diff --git a/source/blender/render/intern/include/pixelshading.h b/source/blender/render/intern/include/pixelshading.h index 0298f90c0d0..feabfea9319 100644 --- a/source/blender/render/intern/include/pixelshading.h +++ b/source/blender/render/intern/include/pixelshading.h @@ -58,10 +58,10 @@ int shadeHaloFloat(HaloRen *har, /** * Render the sky at pixel (x, y). */ -void shadeSkyPixel(float *collector, float fx, float fy, short thread); -void shadeSkyView(float *colf, float *rco, float *view, float *dxyview, short thread); +void shadeSkyPixel(float collector[4], float fx, float fy, short thread); +void shadeSkyView(float col_r[3], const float rco[3], const float view[3], const float dxyview[2], short thread); void shadeAtmPixel(struct SunSky *sunsky, float *collector, float fx, float fy, float distance); -void shadeSunView(float *colf, float *view); +void shadeSunView(float col_r[3], const float view[3]); /* ------------------------------------------------------------------------- */ #endif diff --git a/source/blender/render/intern/include/shadbuf.h b/source/blender/render/intern/include/shadbuf.h index 2dca9963e4f..5bed39db3e9 100644 --- a/source/blender/render/intern/include/shadbuf.h +++ b/source/blender/render/intern/include/shadbuf.h @@ -59,13 +59,13 @@ void threaded_makeshadowbufs(struct Render *re); * @param inp The inproduct between viewvector and ? * */ -float testshadowbuf(struct Render *re, struct ShadBuf *shb, float *rco, float *dxco, float *dyco, float inp, float mat_bias); +float testshadowbuf(struct Render *re, struct ShadBuf *shb, const float rco[3], const float dxco[3], const float dyco[3], float inp, float mat_bias); /** * Determines the shadow factor for lamp , between * and . (Which CS?) */ -float shadow_halo(LampRen *lar, float *p1, float *p2); +float shadow_halo(LampRen *lar, const float p1[3], const float p2[3]); /** * Irregular shadowbuffer diff --git a/source/blender/render/intern/include/shading.h b/source/blender/render/intern/include/shading.h index 75d76c8ae23..91507ef3f98 100644 --- a/source/blender/render/intern/include/shading.h +++ b/source/blender/render/intern/include/shading.h @@ -96,7 +96,7 @@ void ambient_occlusion(struct ShadeInput *shi); void environment_lighting_apply(struct ShadeInput *shi, struct ShadeResult *shr); ListBase *get_lights(struct ShadeInput *shi); -float lamp_get_visibility(struct LampRen *lar, float *co, float *lv, float *dist); +float lamp_get_visibility(struct LampRen *lar, const float co[3], float *lv, float *dist); void lamp_get_shadow(struct LampRen *lar, ShadeInput *shi, float inp, float *shadfac, int do_real); float fresnel_fac(float *view, float *vn, float fresnel, float fac); diff --git a/source/blender/render/intern/include/texture.h b/source/blender/render/intern/include/texture.h index a63c4f7f253..73f9d7a1627 100644 --- a/source/blender/render/intern/include/texture.h +++ b/source/blender/render/intern/include/texture.h @@ -64,11 +64,11 @@ struct ImBuf; /* texture.h */ -void do_halo_tex(struct HaloRen *har, float xn, float yn, float *colf); -void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, float *blend, int skyflag, short thread); +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_material_tex(struct ShadeInput *shi); -void do_lamp_tex(LampRen *la, float *lavec, struct ShadeInput *shi, float *colf, int effect); -void do_volume_tex(struct ShadeInput *shi, float *xyz, int mapto_flag, float *col, float *val); +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[3], float *val); void init_render_textures(Render *re); void end_render_textures(Render *re); @@ -77,8 +77,8 @@ void render_realtime_texture(struct ShadeInput *shi, struct Image *ima); /* imagetexture.h */ -int imagewraposa(struct Tex *tex, struct Image *ima, struct ImBuf *ibuf, float *texvec, float *dxt, float *dyt, struct TexResult *texres); -int imagewrap(struct Tex *tex, struct Image *ima, struct ImBuf *ibuf, float *texvec, struct TexResult *texres); +int imagewraposa(struct Tex *tex, struct Image *ima, struct ImBuf *ibuf, const float texvec[3], const float dxt[3], const float dyt[3], struct TexResult *texres); +int imagewrap(struct Tex *tex, struct Image *ima, struct ImBuf *ibuf, const float texvec[3], struct TexResult *texres); void image_sample(struct Image *ima, float fx, float fy, float dx, float dy, float *result); #endif /* TEXTURE_EXT_H */ diff --git a/source/blender/render/intern/include/volumetric.h b/source/blender/render/intern/include/volumetric.h index a2d1821a62b..87d74de9134 100644 --- a/source/blender/render/intern/include/volumetric.h +++ b/source/blender/render/intern/include/volumetric.h @@ -35,8 +35,8 @@ struct Isect; struct ShadeInput; struct ShadeResult; -float vol_get_density(struct ShadeInput *shi, float *co); -void vol_get_scattering(ShadeInput *shi, float *scatter_col, float *co_, float *view); +float vol_get_density(struct ShadeInput *shi, const float co[3]); +void vol_get_scattering(ShadeInput *shi, float scatter_col[3], const float co[3], const float view[3]); void shade_volume_outside(ShadeInput *shi, ShadeResult *shr); void shade_volume_inside(ShadeInput *shi, ShadeResult *shr); -- cgit v1.2.3