Skip to content

Commit 26babdc

Browse files
committed
Set transparent hint.
1 parent ee03f6a commit 26babdc

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

crates/processing_glfw/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ impl GlfwContext {
6363

6464
glfw.window_hint(glfw::WindowHint::ClientApi(glfw::ClientApiHint::NoApi));
6565
glfw.window_hint(glfw::WindowHint::Visible(false));
66+
glfw.window_hint(glfw::WindowHint::TransparentFramebuffer(true));
6667

6768
let (mut window, events) = glfw
6869
.create_window(width, height, "Processing", WindowMode::Windowed)

crates/processing_render/src/surface.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ use bevy::{
2626
prelude::{Commands, Component, Entity, In, Query, ResMut, Window, With, default},
2727
render::render_resource::{Extent3d, TextureFormat},
2828
window::{
29-
Monitor, RawHandleWrapper, WindowLevel, WindowMode, WindowPosition, WindowResolution,
30-
WindowWrapper,
29+
CompositeAlphaMode, Monitor, RawHandleWrapper, WindowLevel, WindowMode, WindowPosition,
30+
WindowResolution, WindowWrapper,
3131
},
3232
};
3333
use raw_window_handle::{
@@ -122,6 +122,8 @@ fn spawn_surface(
122122
Window {
123123
resolution: WindowResolution::new(physical_width, physical_height)
124124
.with_scale_factor_override(scale_factor),
125+
transparent: true,
126+
composite_alpha_mode: CompositeAlphaMode::PostMultiplied,
125127
..default()
126128
},
127129
handle_wrapper,

0 commit comments

Comments
 (0)