From bf1b622dd962416fef94ccb2f47878eced31e20d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sun, 16 Aug 2020 15:38:34 +0200 Subject: GPUState: GPU_blend final API renaming We now use GPU_blend for enabling / disabling blending and explicitly set the blend equation. --- source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c') diff --git a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c index ef3381110d4..13f3903f0b2 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c @@ -195,7 +195,7 @@ static void button2d_draw_intern(const bContext *C, } else { - GPU_blend(true); + GPU_blend(GPU_BLEND_ALPHA); if (draw_options & ED_GIZMO_BUTTON_SHOW_BACKDROP) { const float fill_alpha = RNA_float_get(gz->ptr, "backdrop_fill_alpha"); @@ -265,7 +265,7 @@ static void button2d_draw_intern(const bContext *C, UI_icon_draw_alpha(pos[0], pos[1], button->icon, alpha); GPU_polygon_smooth(true); } - GPU_blend(false); + GPU_blend(GPU_BLEND_NONE); } if (need_to_pop) { @@ -283,9 +283,9 @@ static void gizmo_button2d_draw(const bContext *C, wmGizmo *gz) { const bool is_highlight = (gz->state & WM_GIZMO_STATE_HIGHLIGHT) != 0; - GPU_blend(true); + GPU_blend(GPU_BLEND_ALPHA); button2d_draw_intern(C, gz, false, is_highlight); - GPU_blend(false); + GPU_blend(GPU_BLEND_NONE); } static int gizmo_button2d_test_select(bContext *C, wmGizmo *gz, const int mval[2]) -- cgit v1.2.3