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/space_file/file_draw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/space_file/file_draw.c') diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 88fd505d26d..51e6c99ff39 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -267,7 +267,7 @@ static void file_draw_preview(uiBlock *block, xco = sx + (int)dx; yco = sy - layout->prv_h + (int)dy; - GPU_blend(true); + GPU_blend(GPU_BLEND_ALPHA); /* the large image */ @@ -290,7 +290,7 @@ static void file_draw_preview(uiBlock *block, if (!is_icon && typeflags & FILE_TYPE_BLENDERLIB) { /* Datablock preview images use premultiplied alpha. */ - GPU_blend_set_func_separate(GPU_BLEND_ALPHA_PREMULT); + GPU_blend(GPU_BLEND_ALPHA_PREMULT); } IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR); @@ -308,7 +308,7 @@ static void file_draw_preview(uiBlock *block, 1.0f, col); - GPU_blend_set_func_separate(GPU_BLEND_ALPHA); + GPU_blend(GPU_BLEND_ALPHA); if (icon && is_icon) { /* Small icon in the middle of large image, scaled to fit container and UI scale */ @@ -389,7 +389,7 @@ static void file_draw_preview(uiBlock *block, UI_but_drag_set_image(but, BLI_strdup(path), icon, imb, scale, true); } - GPU_blend(false); + GPU_blend(GPU_BLEND_NONE); } static void renamebutton_cb(bContext *C, void *UNUSED(arg1), char *oldname) -- cgit v1.2.3