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:
authorClément Foucault <foucault.clem@gmail.com>2020-08-16 16:38:34 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-18 22:30:10 +0300
commitbf1b622dd962416fef94ccb2f47878eced31e20d (patch)
tree8622462ebdfbc6e347975d1b875b817356e4e84a /source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c
parent10558d6973be8fc461a4b8aad734ba0881d18e85 (diff)
GPUState: GPU_blend final API renaming
We now use GPU_blend for enabling / disabling blending and explicitly set the blend equation.
Diffstat (limited to 'source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c')
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c8
1 files changed, 4 insertions, 4 deletions
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])