- 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.
This commit is contained in:
@@ -1619,8 +1619,10 @@ static void ccgDM_drawFacesTex_common(DerivedMesh *dm,
|
||||
|
||||
if(drawParams)
|
||||
flag = drawParams(tf, mcol, mat_nr);
|
||||
else
|
||||
else if(index != ORIGINDEX_NONE)
|
||||
flag= (drawParamsMapped)? drawParamsMapped(userData, index): 1;
|
||||
else
|
||||
flag= 1;
|
||||
|
||||
if (flag == 0) { /* flag 0 == the face is hidden or invisible */
|
||||
if(tf) tf += gridFaces*gridFaces*numVerts;
|
||||
|
||||
@@ -523,7 +523,7 @@ static int draw_em_tf_mapped__set_draw(void *userData, int index)
|
||||
MCol *mcol;
|
||||
int matnr;
|
||||
|
||||
if (efa==NULL || efa->h)
|
||||
if (efa->h)
|
||||
return 0;
|
||||
|
||||
tface = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user