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 15:47:13 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-18 22:30:10 +0300
commita1459b2f7a53fc9e7a52260e975c47c48c6c383d (patch)
tree2a6c612d8efd0fa3240a7618b66490b8be1b8bbd /source/blender/editors/screen/screen_draw.c
parent2ae1c895a2f7590d0783a27176085da45ef12bc5 (diff)
Cleanup: GPU: Move towards an explicit Blend state
This make use of the GLStateStack functions for: - `GPU_blend()` - `GPU_blend_set_func()` - `GPU_blend_set_func_separate()` The goal is to unify them using an explicit state setting. This will remove the need to use obscure blend functions
Diffstat (limited to 'source/blender/editors/screen/screen_draw.c')
-rw-r--r--source/blender/editors/screen/screen_draw.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/screen/screen_draw.c b/source/blender/editors/screen/screen_draw.c
index d8d47fb01aa..b0e96c2dae1 100644
--- a/source/blender/editors/screen/screen_draw.c
+++ b/source/blender/editors/screen/screen_draw.c
@@ -308,10 +308,9 @@ static void scrarea_draw_shape_dark(ScrArea *area, char dir, uint pos)
*/
static void scrarea_draw_shape_light(ScrArea *area, char UNUSED(dir), uint pos)
{
- GPU_blend_set_func(GPU_DST_COLOR, GPU_SRC_ALPHA);
- /* value 181 was hardly computed: 181~105 */
- immUniformColor4ub(255, 255, 255, 50);
- /* draw_join_shape(area, dir); */
+ GPU_blend_set_func_separate(
+ GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
+ immUniformColor4ub(255, 255, 255, 25);
immRectf(pos, area->v1->vec.x, area->v1->vec.y, area->v3->vec.x, area->v3->vec.y);
}