Merge pull request #1021 from akhilman/fix-glow-alpha-compositing

Fix window holes behind transparent objects
This commit is contained in:
Héctor Ramón 2021-09-04 14:20:03 +07:00 committed by GitHub
commit 589f68df0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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