Fix window holes behind transparent objects
Without this change, the transparent objects composed over the opaque background creates the transparency of the entire window through which the desktop wallpaper could be seen. This problem manifested itself with glow backend and wayland compositor (gnome). This patch completely eliminates this problem. With it, the final image produced by glow backend corresponds to the image produced by the wgpu backend. Fixes #1018
This commit is contained in:
parent
7ebdbec8e7
commit
666f676d7c
1 changed files with 6 additions and 1 deletions
|
|
@ -26,7 +26,12 @@ impl iced_graphics::window::GLCompositor for Compositor {
|
|||
|
||||
// Enable alpha blending
|
||||
gl.enable(glow::BLEND);
|
||||
gl.blend_func(glow::SRC_ALPHA, glow::ONE_MINUS_SRC_ALPHA);
|
||||
gl.blend_func_separate(
|
||||
glow::SRC_ALPHA,
|
||||
glow::ONE_MINUS_SRC_ALPHA,
|
||||
glow::ONE,
|
||||
glow::ONE_MINUS_SRC_ALPHA,
|
||||
);
|
||||
|
||||
// Disable multisampling by default
|
||||
gl.disable(glow::MULTISAMPLE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue