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:
authorCampbell Barton <ideasman42@gmail.com>2010-10-31 18:39:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-10-31 18:39:37 +0300
commit3367ef8b6591b62b1b76f07fccb310485f6d45c7 (patch)
treecad394807148ecbd211b4deb1427e15eb9e34001 /source/blender/gpu/intern/gpu_material.c
parent4c80d13e54f5421774a992c1f1ff1c1ae832c2fc (diff)
initialize structs to zero rather then using memset().
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-rw-r--r--source/blender/gpu/intern/gpu_material.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index a31ec950711..d7aa7c3377d 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -629,10 +629,8 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la
}
else {
if(lamp->type == LA_AREA) {
- float area[4][4], areasize;
+ float area[4][4]= {{0.0f}}, areasize= 0.0f;
- memset(&area, 0, sizeof(area));
- memset(&areasize, 0, sizeof(areasize));
mat->dynproperty |= DYN_LAMP_VEC|DYN_LAMP_CO;
GPU_link(mat, "shade_inp_area", GPU_builtin(GPU_VIEW_POSITION), GPU_dynamic_uniform(lamp->dynco), GPU_dynamic_uniform(lamp->dynvec), vn, GPU_uniform((float*)area),
GPU_uniform(&areasize), GPU_uniform(&lamp->k), &inp);