GPU: clear color with 1.0 alpha

This impacts GHOST/Wayland which draws windows using alpha.
This commit is contained in:
Christian Rauch
2020-07-22 10:45:30 +10:00
committed by Campbell Barton
parent 607d745a79
commit cfa788cf9a
4 changed files with 5 additions and 5 deletions

View File

@@ -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)

View File

@@ -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. */

View File

@@ -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);

View File

@@ -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);