[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14254] trunk/blender/source/blender/ blenkernel/intern/DerivedMesh.c: make solid faces draw vertex colors in editmode ( they used to use only one of the faces colors per face)

Campbell Barton ideasman42 at gmail.com
Wed Mar 26 21:17:20 CET 2008


Revision: 14254
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14254
Author:   campbellbarton
Date:     2008-03-26 21:17:20 +0100 (Wed, 26 Mar 2008)

Log Message:
-----------
make solid faces draw vertex colors in editmode (they used to use only one of the faces colors per face)

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c

Modified: trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c	2008-03-26 19:38:59 UTC (rev 14253)
+++ trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c	2008-03-26 20:17:20 UTC (rev 14254)
@@ -733,6 +733,9 @@
 	EditFace *efa;
 	int i;
 
+	/* always use smooth shading even for flat faces, else vertex colors wont interpolate */
+	glShadeModel(GL_SMOOTH);
+	
 	if (vertexCos) {
 		EditVert *eve;
 
@@ -757,7 +760,8 @@
 				if (flag==1 && mcol)
 					cp= (unsigned char*)mcol;
 
-				glShadeModel(drawSmooth?GL_SMOOTH:GL_FLAT);
+				/* we always want smooth here since otherwise vertex colors dont interpolate */
+				/* glShadeModel(drawSmooth?GL_SMOOTH:GL_FLAT); */
 
 				glBegin(efa->v4?GL_QUADS:GL_TRIANGLES);
 				if (!drawSmooth) {
@@ -825,7 +829,8 @@
 				if (flag==1 && mcol)
 					cp= (unsigned char*)mcol;
 
-				glShadeModel(drawSmooth?GL_SMOOTH:GL_FLAT);
+				/* we always want smooth here since otherwise vertex colors dont interpolate */
+				/*glShadeModel(drawSmooth?GL_SMOOTH:GL_FLAT);*/
 
 				glBegin(efa->v4?GL_QUADS:GL_TRIANGLES);
 				if (!drawSmooth) {





More information about the Bf-blender-cvs mailing list