Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2011-09-17 19:17:12 +0400
committerAntony Riakiotakis <kalast@gmail.com>2011-09-17 19:17:12 +0400
commit18735b63126bc6f3e46f9ae6be35debadb3915a2 (patch)
tree3d085feec4d259d5c6f3c414182f7613982c7159 /source/blender/editors/uvedit/uvedit_draw.c
parent0ed9f5cce749f9e343c73ebc3c63f5c6ba9e6bce (diff)
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.
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_draw.c')
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index 4e95404953e..89a2381ea2f 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -684,7 +684,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
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 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
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();
}