[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40302] branches/bmesh/blender/source/ blender/editors/uvedit/uvedit_draw.c: Use GL_LINES instead of GL_LINE_LOOP for selected uv edge drawing, avoids an extra conditional and drawing an extra 0 size line per uv.

Antony Riakiotakis kalast at gmail.com
Sat Sep 17 17:17:13 CEST 2011


Revision: 40302
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40302
Author:   psy-fi
Date:     2011-09-17 15:17:12 +0000 (Sat, 17 Sep 2011)
Log Message:
-----------
Use GL_LINES instead of GL_LINE_LOOP for selected uv edge drawing, avoids an extra conditional and drawing an extra 0 size line per uv.

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/editors/uvedit/uvedit_draw.c

Modified: branches/bmesh/blender/source/blender/editors/uvedit/uvedit_draw.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/uvedit/uvedit_draw.c	2011-09-17 14:51:01 UTC (rev 40301)
+++ branches/bmesh/blender/source/blender/editors/uvedit/uvedit_draw.c	2011-09-17 15:17:12 UTC (rev 40302)
@@ -684,7 +684,7 @@
 			glColor4ubv((unsigned char *)col2); 
 			
 			if(me->drawflag & ME_DRAWEDGES) {
-				int lastsel= 0, sel;
+				int sel;
 				UI_GetThemeColor4ubv(TH_VERTEX_SELECT, col1);
 
 				if(interpedges) {
@@ -712,17 +712,15 @@
 						if (!BM_GetIndex(efa))
 							continue;
 
-						glBegin(GL_LINE_LOOP);
-						i = 0;
+						glBegin(GL_LINES);
 						BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
 							sel = (uvedit_edge_selected(em, scene, l)? 1 : 0);
-							if(sel != lastsel) { glColor4ubv(sel ? (GLubyte *)col1 : (GLubyte *)col2); lastsel = sel; }
+							glColor4ubv(sel ? (GLubyte *)col1 : (GLubyte *)col2);
 
 							luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
 							glVertex2fv(luv->uv);
 							luv = CustomData_bmesh_get(&em->bm->ldata, l->next->head.data, CD_MLOOPUV);
 							glVertex2fv(luv->uv);
-							i += 1;
 						}
 						glEnd();
 					}




More information about the Bf-blender-cvs mailing list