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-05 15:16:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-05 15:16:07 +0400
commita7258c96512d45f2392e13f5d5c8fb6edf651a00 (patch)
tree4f96dcd8267172fba0bb57752330e581ae7d6690 /source/blender/gpu
parent9c91affd6f91b6c2db2af308bd5c103c9a466acd (diff)
- fix for crash when drawing a subsurf after a modifier that lost original indices (bevel/screw/decimate)
- fix for own mistake used madd_v3_v3fl rather then mul_v3_v3fl, r32241.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_draw.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index e8701793e5d..55522ea18b9 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -911,10 +911,10 @@ static void gpu_material_to_fixed(GPUMaterialFixed *smat, const Material *bmat,
}
}
else {
- madd_v3_v3fl(smat->diff, &bmat->r, bmat->ref + bmat->emit);
+ mul_v3_v3fl(smat->diff, &bmat->r, bmat->ref + bmat->emit);
smat->diff[3]= 1.0; /* caller may set this to bmat->alpha */
- madd_v3_v3fl(smat->spec, &bmat->specr, bmat->spec);
+ mul_v3_v3fl(smat->spec, &bmat->specr, bmat->spec);
smat->spec[3]= 1.0; /* always 1 */
smat->hard= CLAMPIS(bmat->har, 0, 128);
@@ -1043,10 +1043,10 @@ int GPU_enable_material(int nr, void *attribs)
memset(&GMS, 0, sizeof(GMS));
- madd_v3_v3fl(diff, &defmaterial.r, defmaterial.ref + defmaterial.emit);
+ mul_v3_v3fl(diff, &defmaterial.r, defmaterial.ref + defmaterial.emit);
diff[3]= 1.0;
- madd_v3_v3fl(spec, &defmaterial.specr, defmaterial.spec);
+ mul_v3_v3fl(spec, &defmaterial.specr, defmaterial.spec);
spec[3]= 1.0;
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, diff);
@@ -1286,7 +1286,7 @@ int GPU_scene_object_lights(Scene *scene, Object *ob, int lay, float viewmat[][4
}
/* setup energy */
- madd_v3_v3fl(energy, &la->r, la->energy);
+ mul_v3_v3fl(energy, &la->r, la->energy);
energy[3]= 1.0;
glLightfv(GL_LIGHT0+count, GL_DIFFUSE, energy);