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-23 08:58:32 +0300
committerMike Erwin <significant.bit@gmail.com>2016-01-23 08:58:51 +0300
commite25ba162c0b62b19cf367f0f29e29d0c0960978d (patch)
tree6f274502a6fb22b1679decca4b944e09fab29137 /source/blender/editors/sculpt_paint
parent90293a8da375b785fa58d3f56de1b286072107c1 (diff)
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.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c1
2 files changed, 0 insertions, 3 deletions
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);