From e25ba162c0b62b19cf367f0f29e29d0c0960978d Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Sat, 23 Jan 2016 00:58:32 -0500 Subject: OpenGL: call glLineWidth less often MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- source/blender/editors/transform/transform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/transform/transform.c') diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 89313d3dc28..f9d13eefc09 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1711,6 +1711,7 @@ static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata) UI_ThemeColor(TH_VIEW_OVERLAY); setlinestyle(3); + glLineWidth(1); glBegin(GL_LINES); glVertex2iv(t->mval); glVertex2fv(cent); @@ -1752,6 +1753,7 @@ static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata) UI_ThemeColor(TH_VIEW_OVERLAY); setlinestyle(3); + glLineWidth(1); glBegin(GL_LINES); glVertex2iv(t->mval); glVertex2fv(cent); @@ -1804,7 +1806,6 @@ static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata) } glPopMatrix(); - glLineWidth(1.0); } } -- cgit v1.2.3