diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-16 16:16:21 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-18 22:30:10 +0300 |
commit | 969bcf0793dca0e75bf42998aba92b1abd90ec23 (patch) | |
tree | 26456f72a028a27e32b0311072749e34813894fe /source/blender/editors/gpencil | |
parent | a1459b2f7a53fc9e7a52260e975c47c48c6c383d (diff) |
Cleanup: GPUState: Replace blend func separate by enum
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/annotate_draw.c | 3 | ||||
-rw-r--r-- | source/blender/editors/gpencil/annotate_paint.c | 3 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 3 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 3 |
4 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c index df479325027..e0e8f72fd16 100644 --- a/source/blender/editors/gpencil/annotate_draw.c +++ b/source/blender/editors/gpencil/annotate_draw.c @@ -734,8 +734,7 @@ static void annotation_draw_data( GPU_line_smooth(true); /* turn on alpha-blending */ - GPU_blend_set_func_separate( - GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA); + GPU_blend_set_func_separate(GPU_BLEND_ALPHA); GPU_blend(true); /* Do not write to depth (avoid self-occlusion). */ diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index 30e4fe0b531..52c6dcc5f77 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -1701,8 +1701,7 @@ static void annotation_draw_eraser(bContext *UNUSED(C), int x, int y, void *p_pt GPU_line_smooth(true); GPU_blend(true); - GPU_blend_set_func_separate( - GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA); + GPU_blend_set_func_separate(GPU_BLEND_ALPHA); immUniformColor4ub(255, 100, 100, 20); imm_draw_circle_fill_2d(shdr_pos, x, y, p->radius, 40); diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 680e7b37d31..81999bc7721 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -2269,8 +2269,7 @@ static void gpencil_draw_eraser(bContext *UNUSED(C), int x, int y, void *p_ptr) GPU_line_smooth(true); GPU_blend(true); - GPU_blend_set_func_separate( - GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA); + GPU_blend_set_func_separate(GPU_BLEND_ALPHA); immUniformColor4ub(255, 100, 100, 20); imm_draw_circle_fill_2d(shdr_pos, x, y, p->radius, 40); diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 5aae10a5db5..aa3b6991a82 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -1761,8 +1761,7 @@ void ED_gpencil_brush_draw_eraser(Brush *brush, int x, int y) GPU_line_smooth(true); GPU_blend(true); - GPU_blend_set_func_separate( - GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA); + GPU_blend_set_func_separate(GPU_BLEND_ALPHA); immUniformColor4ub(255, 100, 100, 20); imm_draw_circle_fill_2d(shdr_pos, x, y, radius, 40); |