[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40305] branches/bmesh/blender/source/ blender/editors/uvedit/uvedit_draw.c: Resurrect the conditional to avoid extra color state changes.
Antony Riakiotakis
kalast at gmail.com
Sat Sep 17 19:18:56 CEST 2011
Revision: 40305
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40305
Author: psy-fi
Date: 2011-09-17 17:18:55 +0000 (Sat, 17 Sep 2011)
Log Message:
-----------
Resurrect the conditional to avoid extra color state changes. Thanks Ender79 for the suggestion!
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 16:57:37 UTC (rev 40304)
+++ branches/bmesh/blender/source/blender/editors/uvedit/uvedit_draw.c 2011-09-17 17:18:55 UTC (rev 40305)
@@ -684,7 +684,7 @@
glColor4ubv((unsigned char *)col2);
if(me->drawflag & ME_DRAWEDGES) {
- int sel;
+ int sel, lastsel = -1;
UI_GetThemeColor4ubv(TH_VERTEX_SELECT, col1);
if(interpedges) {
@@ -715,8 +715,10 @@
glBegin(GL_LINES);
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
sel = (uvedit_edge_selected(em, scene, l)? 1 : 0);
- glColor4ubv(sel ? (GLubyte *)col1 : (GLubyte *)col2);
-
+ if(sel != lastsel){
+ glColor4ubv(sel ? (GLubyte *)col1 : (GLubyte *)col2);
+ lastsel = sel;
+ }
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);
More information about the Bf-blender-cvs
mailing list