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/sculpt_paint/paint_cursor.c | 2 -- source/blender/editors/sculpt_paint/paint_image.c | 1 - 2 files changed, 3 deletions(-) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index aad9df1a978..2f4dc549694 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -932,8 +932,6 @@ static void paint_draw_curve_cursor(Brush *brush) draw_rect_point(&cp->bez.vec[0][0], 8.0, cp->bez.f1 || cp->bez.f2); draw_rect_point(&cp->bez.vec[2][0], 8.0, cp->bez.f3 || cp->bez.f2); - glLineWidth(1.0); - glDisable(GL_BLEND); glDisable(GL_LINE_SMOOTH); glDisableClientState(GL_VERTEX_ARRAY); diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 49e5e264659..7f1a4212ce4 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -727,7 +727,6 @@ static void gradient_draw_line(bContext *UNUSED(C), int x, int y, void *customda glLineWidth(2.0); glColor4ub(255, 255, 255, 255); sdrawline(x, y, pop->startmouse[0], pop->startmouse[1]); - glLineWidth(1.0); glDisable(GL_BLEND); glDisable(GL_LINE_SMOOTH); -- cgit v1.2.3