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:
authorMike Erwin <significant.bit@gmail.com>2016-01-16 08:11:49 +0300
committerMike Erwin <significant.bit@gmail.com>2016-01-16 08:11:49 +0300
commitf4cd7ca9c63c76aa2fb2a16868af14af57fd9a36 (patch)
treef9fb6feeed7063036f8a51e7ae6e6ace4ef54141 /source/blender/editors/space_view3d/drawobject.c
parent2d71d13ea2cb7a7640e5139dc24341bd58416d57 (diff)
OpenGL: pull glBegin/End out of loop
so that all points here are drawn between one Begin/End pair.
Diffstat (limited to 'source/blender/editors/space_view3d/drawobject.c')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 5b95c047036..2a09b31c737 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -5807,19 +5807,16 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit)
if (cdata) { MEM_freeN(cdata); cd = cdata = NULL; }
}
else if (pset->selectmode == SCE_SELECT_END) {
+ glBegin(GL_POINTS);
for (i = 0, point = edit->points; i < totpoint; i++, point++) {
if ((point->flag & PEP_HIDE) == 0 && point->totkey) {
key = point->keys + point->totkey - 1;
- if (key->flag & PEK_SELECT)
- glColor3fv(sel_col);
- else
- glColor3fv(nosel_col);
+ glColor3fv((key->flag & PEK_SELECT) ? sel_col : nosel_col);
/* has to be like this.. otherwise selection won't work, have try glArrayElement later..*/
- glBegin(GL_POINTS);
glVertex3fv((key->flag & PEK_USE_WCO) ? key->world_co : key->co);
- glEnd();
}
}
+ glEnd();
}
}