OpenGL: call glLineWidth less often

Each LINES draw call is now responsible for its own line width. No need
to set it back to its 1.0 default after every draw.

This eliminates half our calls to glLineWidth , similar to last week’s
work on glPointSize.
This commit is contained in:
2016-01-23 00:58:32 -05:00
parent 90293a8da3
commit e25ba162c0
25 changed files with 31 additions and 87 deletions

View File

@@ -1050,8 +1050,6 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
glVertex3fv(kcd->prev.cage);
glVertex3fv(kcd->curr.cage);
glEnd();
glLineWidth(1.0);
}
if (kcd->prev.vert) {
@@ -1080,8 +1078,6 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
glVertex3fv(kcd->curr.edge->v1->cageco);
glVertex3fv(kcd->curr.edge->v2->cageco);
glEnd();
glLineWidth(1.0);
}
else if (kcd->curr.vert) {
glColor3ubv(kcd->colors.point);
@@ -1151,7 +1147,6 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
}
glEnd();
glLineWidth(1.0);
}
if (kcd->totkvert > 0) {