piston_window icon indicating copy to clipboard operation
piston_window copied to clipboard

Transparent window

Open gcstr opened this issue 5 years ago • 0 comments

I'm not being able to create a transparent window. The method transparent on WindowSettings seems to have no effect:

extern crate piston_window;
use piston_window::*;
fn main() {
    let mut window: PistonWindow = WindowSettings::new("Hello Piston!", (640, 480))
        .exit_on_esc(true)
        .transparent(true)
        .build()
        .unwrap_or_else(|e| { panic!("Failed to build PistonWindow: {}", e) });
    while let Some(e) = window.next() {
        window.draw_2d(&e, |_c, g, _d| {
            clear([0.5, 1.0, 0.5, 0.5], g);
        });
    }
}

gcstr avatar Jan 16 '21 15:01 gcstr