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_clip/clip_draw.c | 9 +++------ source/blender/editors/space_clip/clip_utils.c | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'source/blender/editors/space_clip') diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index 07bdd337269..d17041737e4 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -154,8 +154,7 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *region, MovieClip *clip MovieTrackingReconstruction *reconstruction = BKE_tracking_get_active_reconstruction(tracking); 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); /* cache background */ ED_region_cache_draw_background(region); @@ -331,8 +330,7 @@ static void draw_movieclip_buffer(const bContext *C, /* checkerboard for case alpha */ if (ibuf->planes == 32) { 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); imm_draw_box_checker_2d(x, y, x + zoomx * ibuf->x, y + zoomy * ibuf->y); } @@ -1213,8 +1211,7 @@ static void draw_plane_marker_image(Scene *scene, if (plane_track->image_opacity != 1.0f || ibuf->planes == 32) { transparent = 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); } GPUTexture *texture = GPU_texture_create_nD(ibuf->x, diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c index 03f791ad70d..8e50c3f6774 100644 --- a/source/blender/editors/space_clip/clip_utils.c +++ b/source/blender/editors/space_clip/clip_utils.c @@ -415,8 +415,7 @@ void clip_draw_sfra_efra(View2D *v2d, Scene *scene) UI_view2d_view_ortho(v2d); /* currently clip editor supposes that editing clip length is equal to scene frame range */ - 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); uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); -- cgit v1.2.3