Skip to content

Commit

Permalink
Merge pull request #1021 from akhilman/fix-glow-alpha-compositing
Browse files Browse the repository at this point in the history
Fix window holes behind transparent objects
  • Loading branch information
hecrj authored Sep 4, 2021
2 parents 7ebdbec + 666f676 commit 589f68d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion glow/src/window/compositor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 589f68d

Please sign in to comment.