diff options
Diffstat (limited to 'source/blender/editors/mask/mask_draw.c')
-rw-r--r-- | source/blender/editors/mask/mask_draw.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c index 9a8382b2136..2b4f94a37ef 100644 --- a/source/blender/editors/mask/mask_draw.c +++ b/source/blender/editors/mask/mask_draw.c @@ -51,6 +51,8 @@ #include "BIF_gl.h" #include "BIF_glutil.h" +#include "GPU_basic_shader.h" + #include "UI_resources.h" #include "UI_view2d.h" @@ -100,10 +102,10 @@ static void draw_spline_parents(MaskLayer *UNUSED(masklay), MaskSpline *spline) if (!spline->tot_point) return; - glColor3ub(0, 0, 0); - glEnable(GL_LINE_STIPPLE); - glLineStipple(1, 0xAAAA); + GPU_basic_shader_bind_enable(GPU_SHADER_LINE | GPU_SHADER_STIPPLE); + GPU_basic_shader_line_stipple(1, 0xAAAA); + glColor3ub(0, 0, 0); glBegin(GL_LINES); for (i = 0; i < spline->tot_point; i++) { @@ -121,7 +123,7 @@ static void draw_spline_parents(MaskLayer *UNUSED(masklay), MaskSpline *spline) glEnd(); - glDisable(GL_LINE_STIPPLE); + GPU_basic_shader_bind_disable(GPU_SHADER_LINE | GPU_SHADER_STIPPLE); } #endif @@ -455,7 +457,8 @@ static void mask_draw_curve_type(const bContext *C, MaskSpline *spline, float (* case MASK_DT_DASH: default: - glEnable(GL_LINE_STIPPLE); + GPU_basic_shader_bind_enable(GPU_SHADER_LINE | GPU_SHADER_STIPPLE); + GPU_basic_shader_line_stipple(3, 0xAAAA); #ifdef USE_XOR glEnable(GL_COLOR_LOGIC_OP); @@ -463,7 +466,6 @@ static void mask_draw_curve_type(const bContext *C, MaskSpline *spline, float (* #endif mask_color_active_tint(rgb_tmp, rgb_spline, is_active); glColor4ubv(rgb_tmp); - glLineStipple(3, 0xaaaa); glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(2, GL_FLOAT, 0, points); glDrawArrays(draw_method, 0, tot_point); @@ -473,10 +475,10 @@ static void mask_draw_curve_type(const bContext *C, MaskSpline *spline, float (* #endif mask_color_active_tint(rgb_tmp, rgb_black, is_active); glColor4ubv(rgb_tmp); - glLineStipple(3, 0x5555); + GPU_basic_shader_line_stipple(3, 0x5555); glDrawArrays(draw_method, 0, tot_point); - glDisable(GL_LINE_STIPPLE); + GPU_basic_shader_bind_disable(GPU_SHADER_LINE | GPU_SHADER_STIPPLE); break; |