diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-05-07 18:38:05 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-05-07 18:38:05 +0300 |
commit | 014cdd3441be1adfb90ec3742bd2c12927cd20bd (patch) | |
tree | fc5ebd25e8393915449c0fc70c4495888e5215bb | |
parent | 9f2e995c3edf04ca490720b8a2d5af276e1e7d7c (diff) |
Fix T97600 Regression: rendering in new window displays flickers
This is because some drivers / GPU actually still do double buffer swapping
but others don't. Adding this do ensure the background color of the first
redraw.
Note that this fix was not tested on the problematic hardware and might not
solve the issue.
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 382a37e09e5..c0427f9be9a 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -578,6 +578,9 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm, wm_window_swap_buffers(win); + /* Clear double buffer to avoids flickering of new windows on certain drivers. (See T97600) */ + GPU_clear_color(0.55f, 0.55f, 0.55f, 1.0f); + // GHOST_SetWindowState(ghostwin, GHOST_kWindowStateModified); } else { |