[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37612] branches/soc-2011-onion/source/ blender/editors/uvedit/uvedit_draw.c: smart welding - playing with colors, I like this preview better, subject to change of course

Ryakiotakis Antonis kalast at gmail.com
Sat Jun 18 02:48:00 CEST 2011


Revision: 37612
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37612
Author:   psy-fi
Date:     2011-06-18 00:47:59 +0000 (Sat, 18 Jun 2011)
Log Message:
-----------
smart welding - playing with colors, I like this preview better, subject to change of course

Modified Paths:
--------------
    branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_draw.c

Modified: branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_draw.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_draw.c	2011-06-18 00:37:47 UTC (rev 37611)
+++ branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_draw.c	2011-06-18 00:47:59 UTC (rev 37612)
@@ -837,26 +837,34 @@
 	/* finally draw stitch preview */
 	if((stitch_preview) && stitch_preview->enabled){
 		glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);
+		glEnable(GL_BLEND);
 		glEnable(GL_VERTEX_ARRAY);
 
-		glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
-		glColor4f(0.0, 1.0, 0.0, 0.5);
 		glVertexPointer(2, GL_FLOAT, 0, stitch_preview->previewTris);
+		glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+		glColor4f(0.0, 1.0, 0.0, 0.2);
 		glDrawArrays(GL_TRIANGLES, 0, stitch_preview->numOfTris*3);
+		glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+		glColor4f(1.0, 0.0, 1.0, 0.2);
+		glDrawArrays(GL_TRIANGLES, 0, stitch_preview->numOfTris*3);
 		glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
 		glColor4f(0.0, 0.0, 1.0, 0.5);
 		glDrawArrays(GL_TRIANGLES, 0, stitch_preview->numOfTris*3);
 
-		glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+		glVertexPointer(2, GL_FLOAT, 0, stitch_preview->previewQuads);
+		glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
 		glColor4f(0.0, 1.0, 0.0, 0.5);
-		glVertexPointer(2, GL_FLOAT, 0, stitch_preview->previewQuads);
 		glDrawArrays(GL_QUADS, 0, stitch_preview->numOfQuads*4);
+		glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+		glColor4f(1.0, 0.0, 1.0, 0.5);
+		glDrawArrays(GL_QUADS, 0, stitch_preview->numOfQuads*4);
 		glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
 		glColor4f(0.0, 0.0, 1.0, 0.5);
 		glDrawArrays(GL_QUADS, 0, stitch_preview->numOfQuads*4);
 
 		glPopClientAttrib();
 		glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+		glDisable(GL_BLEND);
 	}
 
 	glPointSize(1.0);




More information about the Bf-blender-cvs mailing list