From cfa788cf9a8ef08f11beb04bd4ea7e87b2a9bf6e Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Wed, 22 Jul 2020 10:45:30 +1000 Subject: GPU: clear color with 1.0 alpha This impacts GHOST/Wayland which draws windows using alpha. --- source/blender/editors/interface/resources.c | 2 +- source/blender/editors/space_file/space_file.c | 2 +- source/blender/editors/space_graph/space_graph.c | 4 ++-- source/blender/windowmanager/intern/wm_window.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 087bb2cae16..84fe3e13426 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -1471,7 +1471,7 @@ void UI_ThemeClearColor(int colorid) float col[3]; UI_GetThemeColor3fv(colorid, col); - GPU_clear_color(col[0], col[1], col[2], 0.0f); + GPU_clear_color(col[0], col[1], col[2], 1.0f); } void UI_ThemeClearColorAlpha(int colorid, float alpha) diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 56f3fd08bae..43939b9ff54 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -458,7 +458,7 @@ static void file_main_region_draw(const bContext *C, ARegion *region) /* clear and setup matrix */ UI_GetThemeColor3fv(TH_BACK, col); - GPU_clear_color(col[0], col[1], col[2], 0.0); + GPU_clear_color(col[0], col[1], col[2], 1.0f); GPU_clear(GPU_COLOR_BIT); /* Allow dynamically sliders to be set, saves notifiers etc. */ diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 052e089942c..b1d995a7a0b 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -204,7 +204,7 @@ static void graph_main_region_draw(const bContext *C, ARegion *region) /* clear and setup matrix */ UI_GetThemeColor3fv(TH_BACK, col); - GPU_clear_color(col[0], col[1], col[2], 0.0); + GPU_clear_color(col[0], col[1], col[2], 1.0f); GPU_clear(GPU_COLOR_BIT); UI_view2d_view_ortho(v2d); @@ -362,7 +362,7 @@ static void graph_channel_region_draw(const bContext *C, ARegion *region) /* clear and setup matrix */ UI_GetThemeColor3fv(TH_BACK, col); - GPU_clear_color(col[0], col[1], col[2], 0.0); + GPU_clear_color(col[0], col[1], col[2], 1.0f); GPU_clear(GPU_COLOR_BIT); UI_view2d_view_ortho(v2d); diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 422b5fe5404..e444c5b2109 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -649,7 +649,7 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm, } #endif /* until screens get drawn, make it nice gray */ - GPU_clear_color(0.55, 0.55, 0.55, 0.0); + GPU_clear_color(0.55, 0.55, 0.55, 1.0f); /* Crash on OSS ATI: bugs.launchpad.net/ubuntu/+source/mesa/+bug/656100 */ if (!GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE)) { GPU_clear(GPU_COLOR_BIT); -- cgit v1.2.3