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:33:05 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-18 22:30:10 +0300
commit10558d6973be8fc461a4b8aad734ba0881d18e85 (patch)
tree27b0183af1254e75561c7d3363305b05b3a82283 /source/blender/editors
parent969bcf0793dca0e75bf42998aba92b1abd90ec23 (diff)
Cleanup: GPUState: remove use of GPU_blend_set_func
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_draw.c4
-rw-r--r--source/blender/editors/interface/interface_icons.c4
-rw-r--r--source/blender/editors/mask/mask_draw.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 4cb2b16910e..5614e802f75 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -1161,7 +1161,7 @@ void ui_draw_but_WAVEFORM(ARegion *UNUSED(region),
}
if (scopes->ok && scopes->waveform_1 != NULL) {
- GPU_blend_set_func(GPU_ONE, GPU_ONE);
+ GPU_blend_set_func_separate(GPU_BLEND_ADDITIVE);
GPU_point_size(1.0);
/* LUMA (1 channel) */
@@ -1463,7 +1463,7 @@ void ui_draw_but_VECTORSCOPE(ARegion *UNUSED(region),
/* pixel point cloud */
const float col[3] = {alpha, alpha, alpha};
- GPU_blend_set_func(GPU_ONE, GPU_ONE);
+ GPU_blend_set_func_separate(GPU_BLEND_ADDITIVE);
GPU_point_size(1.0);
GPU_matrix_push();
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 2dc4081a4c6..b43b32aefb3 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -1595,7 +1595,7 @@ static void icon_draw_cache_flush_ex(bool only_full_caches)
/* We need to flush widget base first to ensure correct ordering. */
UI_widgetbase_draw_cache_flush();
- GPU_blend_set_func(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
+ GPU_blend_set_func_separate(GPU_BLEND_ALPHA_PREMULT);
if (!only_full_caches || g_icon_draw_cache.normal.calls == ICON_DRAW_CACHE_SIZE) {
icon_draw_cache_texture_flush_ex(icongltex.tex[0], &g_icon_draw_cache.normal);
@@ -1689,7 +1689,7 @@ static void icon_draw_texture(float x,
/* We need to flush widget base first to ensure correct ordering. */
UI_widgetbase_draw_cache_flush();
- GPU_blend_set_func(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
+ GPU_blend_set_func_separate(GPU_BLEND_ALPHA_PREMULT);
float x1, x2, y1, y2;
diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c
index f39ca028e7a..a4f43650c3b 100644
--- a/source/blender/editors/mask/mask_draw.c
+++ b/source/blender/editors/mask/mask_draw.c
@@ -740,7 +740,7 @@ void ED_mask_draw_region(
if (overlay_mode != MASK_OVERLAY_ALPHACHANNEL) {
/* More blending types could be supported in the future. */
GPU_blend(true);
- GPU_blend_set_func(GPU_DST_COLOR, GPU_ZERO);
+ GPU_blend_set_func_separate(GPU_BLEND_MULTIPLY);
}
GPU_matrix_push();
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 0c5e4ea9538..a80339d4cf7 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -635,7 +635,7 @@ static bool paint_draw_tex_overlay(UnifiedPaintSettings *ups,
/* Premultiplied alpha blending. */
GPU_blend(true);
- GPU_blend_set_func(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
+ GPU_blend_set_func_separate(GPU_BLEND_ALPHA_PREMULT);
immBindBuiltinProgram(GPU_SHADER_2D_IMAGE_COLOR);
@@ -728,7 +728,7 @@ static bool paint_draw_cursor_overlay(
uint texCoord = GPU_vertformat_attr_add(format, "texCoord", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
GPU_blend(true);
- GPU_blend_set_func(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
+ GPU_blend_set_func_separate(GPU_BLEND_ALPHA_PREMULT);
immBindBuiltinProgram(GPU_SHADER_2D_IMAGE_COLOR);