- another drawing bugfix, some normals were passed wrong
authorDaniel Dunbar <daniel@zuster.org>
Sat, 20 Aug 2005 18:49:08 +0000 (18:49 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sat, 20 Aug 2005 18:49:08 +0000 (18:49 +0000)
source/blender/blenkernel/intern/DerivedMesh.c

index 36760c63744ec2ae0f446975249ba0c5852fd8a4..56415dd816bf62c721c06da11d0a1b3be532ffbc 100644 (file)
@@ -828,7 +828,7 @@ static void emDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *us
                                glShadeModel(drawSmooth?GL_SMOOTH:GL_FLAT);
 
                                glBegin(efa->v4?GL_QUADS:GL_TRIANGLES);
-                               if (drawSmooth) {
+                               if (!drawSmooth) {
                                        glNormal3fv(emdm->faceNos[i]);
                                        glVertex3fv(emdm->vertexCos[(int) efa->v1->prev]);
                                        glVertex3fv(emdm->vertexCos[(int) efa->v2->prev]);
@@ -860,7 +860,7 @@ static void emDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *us
                                glShadeModel(drawSmooth?GL_SMOOTH:GL_FLAT);
 
                                glBegin(efa->v4?GL_QUADS:GL_TRIANGLES);
-                               if (drawSmooth) {
+                               if (!drawSmooth) {
                                        glNormal3fv(efa->n);
                                        glVertex3fv(efa->v1->co);
                                        glVertex3fv(efa->v2->co);