[Bf-blender-cvs] [cfa788cf9a8] master: GPU: clear color with 1.0 alpha

Christian Rauch noreply at git.blender.org
Wed Jul 22 04:02:57 CEST 2020


Commit: cfa788cf9a8ef08f11beb04bd4ea7e87b2a9bf6e
Author: Christian Rauch
Date:   Wed Jul 22 10:45:30 2020 +1000
Branches: master
https://developer.blender.org/rBcfa788cf9a8ef08f11beb04bd4ea7e87b2a9bf6e

GPU: clear color with 1.0 alpha

This impacts GHOST/Wayland which draws windows using alpha.

===================================================================

M	source/blender/editors/interface/resources.c
M	source/blender/editors/space_file/space_file.c
M	source/blender/editors/space_graph/space_graph.c
M	source/blender/windowmanager/intern/wm_window.c

===================================================================

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



More information about the Bf-blender-cvs mailing list