Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glow canvas handles transparency differently from wgpu #1018

Closed
akhilman opened this issue Sep 2, 2021 · 3 comments · Fixed by #1021
Closed

Glow canvas handles transparency differently from wgpu #1018

akhilman opened this issue Sep 2, 2021 · 3 comments · Fixed by #1021
Labels
question Further information is requested

Comments

@akhilman
Copy link
Contributor

akhilman commented Sep 2, 2021

Here is the moon's shadow that becomes transparent such you can see text from window below.
image

All I did is changed backend to glow:

diff --git a/examples/solar_system/Cargo.toml b/examples/solar_system/Cargo.toml
index 327fe0aa..bd355c9a 100644
--- a/examples/solar_system/Cargo.toml
+++ b/examples/solar_system/Cargo.toml
@@ -6,5 +6,5 @@ edition = "2018"
 publish = false
 
 [dependencies]
-iced = { path = "../..", features = ["canvas", "tokio", "debug"] }
+iced = { path = "../..", features = ["glow", "glow_canvas", "tokio", "debug"] }
 rand = "0.8.3"

@hecrj
Copy link
Member

hecrj commented Sep 2, 2021

I cannot reproduce the issue.

Would you care to share some more information about your environment and hardware?

@hecrj hecrj added the question Further information is requested label Sep 2, 2021
@akhilman
Copy link
Contributor Author

akhilman commented Sep 2, 2021

I have gnome desktop running on wayland. I believe the wayland is the main reason. With X11 I have no such issue.

@akhilman
Copy link
Contributor Author

akhilman commented Sep 2, 2021

I can reproduce this issue in Fedora 34 workstation inside kvm virtual machine.

akhilman added a commit to akhilman/iced that referenced this issue Sep 2, 2021
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 iced-rs#1018
akhilman added a commit to akhilman/iced that referenced this issue Sep 2, 2021
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 iced-rs#1018
derezzedex pushed a commit to derezzedex/iced that referenced this issue Nov 22, 2021
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 iced-rs#1018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
2 participants