From 969bcf0793dca0e75bf42998aba92b1abd90ec23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sun, 16 Aug 2020 15:16:21 +0200 Subject: Cleanup: GPUState: Replace blend func separate by enum --- source/blender/editors/space_nla/nla_draw.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'source/blender/editors/space_nla') diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index 97939a93d01..92f29023d73 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -434,8 +434,7 @@ static void nla_draw_strip(SpaceNla *snla, */ if ((strip->extendmode != NLASTRIP_EXTEND_NOTHING) && (non_solo == 0)) { /* enable transparency... */ - 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); switch (strip->extendmode) { @@ -746,8 +745,7 @@ void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *region) /* just draw a semi-shaded rect spanning the width of the viewable area if there's data, * and a second darker rect within which we draw keyframe indicator dots if there's data */ - 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); /* get colors for drawing */ @@ -854,8 +852,7 @@ void draw_nla_channel_list(const bContext *C, bAnimContext *ac, ARegion *region) float ymax = NLACHANNEL_FIRST_TOP(ac); /* set blending again, as may not be set in previous step */ - 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); /* loop through channels, and set up drawing depending on their type */ -- cgit v1.2.3