[Bf-blender-cvs] [3e2422a9471] blender2.8: Fix T57115: buttons drawing wrong after recent icon drawing changes.
Brecht Van Lommel
noreply at git.blender.org
Tue Oct 9 14:06:06 CEST 2018
Commit: 3e2422a9471b7fccdd1de57ed06f3a0b95f5bb0a
Author: Brecht Van Lommel
Date: Tue Oct 9 13:36:28 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB3e2422a9471b7fccdd1de57ed06f3a0b95f5bb0a
Fix T57115: buttons drawing wrong after recent icon drawing changes.
===================================================================
M source/blender/editors/interface/interface_icons.c
===================================================================
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 5c53fbb739b..bedc4ac92cf 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -1332,7 +1332,6 @@ static void icon_draw_cache_flush_ex(void)
return;
/* We need to flush widget base first to ensure correct ordering. */
- GPU_blend_set_func_separate(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
UI_widgetbase_draw_cache_flush();
GPU_blend_set_func(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
@@ -1354,6 +1353,8 @@ static void icon_draw_cache_flush_ex(void)
glBindTexture(GL_TEXTURE_2D, 0);
g_icon_draw_cache.calls = 0;
+
+ GPU_blend_set_func_separate(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
}
void UI_icon_draw_cache_end(void)
@@ -1366,11 +1367,7 @@ void UI_icon_draw_cache_end(void)
return;
GPU_blend(true);
- GPU_blend_set_func(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
-
icon_draw_cache_flush_ex();
-
- GPU_blend_set_func_separate(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
GPU_blend(false);
}
More information about the Bf-blender-cvs
mailing list