Fix transparent_window example on wayland (#15262)
Wayland only supports pre-multiplied alpha. Behavior on X11 seems unchanged. # Objective - Fix #10929 on wayland. ## Solution - Request pre-multiplied alpha. ## Testing - Ran the example locally.
This commit is contained in:
parent
e7c1c997ac
commit
f37f5fd281
@ -5,7 +5,7 @@
|
||||
//! for more details.
|
||||
|
||||
use bevy::prelude::*;
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(any(target_os = "macos", target_os = "linux"))]
|
||||
use bevy::window::CompositeAlphaMode;
|
||||
|
||||
fn main() {
|
||||
@ -18,6 +18,8 @@ fn main() {
|
||||
decorations: false,
|
||||
#[cfg(target_os = "macos")]
|
||||
composite_alpha_mode: CompositeAlphaMode::PostMultiplied,
|
||||
#[cfg(target_os = "linux")]
|
||||
composite_alpha_mode: CompositeAlphaMode::PreMultiplied,
|
||||
..default()
|
||||
}),
|
||||
..default()
|
||||
|
Loading…
Reference in New Issue
Block a user