diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-16 15:47:13 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-18 22:30:10 +0300 |
commit | a1459b2f7a53fc9e7a52260e975c47c48c6c383d (patch) | |
tree | 2a6c612d8efd0fa3240a7618b66490b8be1b8bbd /source/blender/windowmanager/intern/wm_draw.c | |
parent | 2ae1c895a2f7590d0783a27176085da45ef12bc5 (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/windowmanager/intern/wm_draw.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index bfc155dce16..a9af4f16747 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -577,8 +577,8 @@ void wm_draw_region_blend(ARegion *region, int view, bool blend) if (blend) { /* GL_ONE because regions drawn offscreen have premultiplied alpha. */ - GPU_blend_set_func(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA); GPU_blend(true); + GPU_blend_set_func(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA); } /* setup actual texture */ @@ -603,7 +603,6 @@ void wm_draw_region_blend(ARegion *region, int view, bool blend) GPU_texture_unbind(texture); if (blend) { - GPU_blend_set_func(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA); GPU_blend(false); } } |