[Bf-blender-cvs] [8dc7c6bc473] greasepencil-object: Fix problem with Eraser cursor

Antonio Vazquez noreply at git.blender.org
Wed Jul 11 10:25:33 CEST 2018


Commit: 8dc7c6bc473dd15525a8049997832af22fbadda4
Author: Antonio Vazquez
Date:   Wed Jul 11 10:25:21 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB8dc7c6bc473dd15525a8049997832af22fbadda4

Fix problem with Eraser cursor

The blend modes were using the GPU functions but the parameters were the old GL mode.

===================================================================

M	source/blender/editors/gpencil/annotate_paint.c
M	source/blender/editors/gpencil/gpencil_paint.c

===================================================================

diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c
index 930b7c089a4..bac62995140 100644
--- a/source/blender/editors/gpencil/annotate_paint.c
+++ b/source/blender/editors/gpencil/annotate_paint.c
@@ -1484,7 +1484,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(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+		GPU_blend_set_func_separate(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_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 7d4ae1fbfd6..63c36dcd64e 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -2022,7 +2022,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(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+		GPU_blend_set_func_separate(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
 
 		immUniformColor4ub(255, 100, 100, 20);
 		imm_draw_circle_fill_2d(shdr_pos, x, y, p->radius, 40);



More information about the Bf-blender-cvs mailing list