diff options
Diffstat (limited to 'source/blender/draw/intern/draw_manager_exec.c')
-rw-r--r-- | source/blender/draw/intern/draw_manager_exec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c index 9aa5efc837d..a70d80257e6 100644 --- a/source/blender/draw/intern/draw_manager_exec.c +++ b/source/blender/draw/intern/draw_manager_exec.c @@ -190,8 +190,8 @@ void drw_state_set(DRWState state) { int test; if (CHANGED_ANY_STORE_VAR( - DRW_STATE_BLEND | DRW_STATE_ADDITIVE | DRW_STATE_MULTIPLY | DRW_STATE_TRANSMISSION | - DRW_STATE_ADDITIVE_FULL, + DRW_STATE_BLEND | DRW_STATE_BLEND_PREMUL | DRW_STATE_ADDITIVE | + DRW_STATE_MULTIPLY | DRW_STATE_TRANSMISSION | DRW_STATE_ADDITIVE_FULL, test)) { if (test) { @@ -201,6 +201,9 @@ void drw_state_set(DRWState state) glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, /* RGB */ GL_ONE, GL_ONE_MINUS_SRC_ALPHA); /* Alpha */ } + else if ((state & DRW_STATE_BLEND_PREMUL) != 0) { + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + } else if ((state & DRW_STATE_MULTIPLY) != 0) { glBlendFunc(GL_DST_COLOR, GL_ZERO); } |