diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-03-25 22:26:52 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-03-25 22:26:52 +0300 |
commit | c602ec74fdd20c17c9ca9c7eb59c048443efc2ce (patch) | |
tree | af55cc2a2da7c385db5a42735e2bbbdea7953e1f /source/blender/windowmanager/intern/wm_draw.c | |
parent | c41e8b8f6f38b9f5a037e11b83b49c4481256716 (diff) |
GPU: State: Replace GL_BLEND by GPU_blend
Diffstat (limited to 'source/blender/windowmanager/intern/wm_draw.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 6a3eeea14f0..4f299201bdf 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -59,6 +59,7 @@ #include "GPU_framebuffer.h" #include "GPU_immediate.h" #include "GPU_matrix.h" +#include "GPU_state.h" #include "GPU_texture.h" #include "GPU_viewport.h" @@ -463,7 +464,7 @@ void wm_draw_region_blend(ARegion *ar, int view, bool blend) if (blend) { /* GL_ONE because regions drawn offscreen have premultiplied alpha. */ - glEnable(GL_BLEND); + GPU_blend(true); glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); } @@ -507,7 +508,7 @@ void wm_draw_region_blend(ARegion *ar, int view, bool blend) if (blend) { glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glDisable(GL_BLEND); + GPU_blend(false); } } |