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>2014-09-18 08:55:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-09-18 08:55:33 +0400
commit3c28eecb6e66313422cdfccc52431b945030fb8c (patch)
tree357c341eeeea4530f4a406ef366fa10a8a06b909
parent87208fa6990d284a7e36463470501a86d448926b (diff)
Fix T41862: Autosmooth & multi-material glitch
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 116f9d9e64c..72de934d08c 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -1324,13 +1324,11 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
glNormal3fv(nor);
}
}
-
- if (lnors) {
- ln1 = &lnors[0][0];
- ln2 = &lnors[0][1];
- ln3 = &lnors[0][2];
- ln4 = &lnors[0][3];
- lnors++;
+ else if (lnors) {
+ ln1 = &lnors[a][0];
+ ln2 = &lnors[a][1];
+ ln3 = &lnors[a][2];
+ ln4 = &lnors[a][3];
}
cddm_draw_attrib_vertex(&attribs, mvert, a, mface->v1, 0, ln1, smoothnormal);
@@ -1651,13 +1649,11 @@ static void cdDM_drawMappedFacesMat(DerivedMesh *dm,
glNormal3fv(nor);
}
}
-
- if (lnors) {
- ln1 = &lnors[0][0];
- ln2 = &lnors[0][1];
- ln3 = &lnors[0][2];
- ln4 = &lnors[0][3];
- lnors++;
+ else if (lnors) {
+ ln1 = &lnors[a][0];
+ ln2 = &lnors[a][1];
+ ln3 = &lnors[a][2];
+ ln4 = &lnors[a][3];
}
/* vertices */