emoon / rust_minifb

Cross platfrom window and framebuffer crate for Rust
MIT License
1.01k stars 97 forks source link

Transparency #164

Closed nyovaya closed 4 years ago

nyovaya commented 4 years ago

This will partially resolve https://github.com/emoon/rust_minifb/issues/133 Implemented:

nyovaya commented 4 years ago

@cole-h Are you interested to help here?

emoon commented 4 years ago

Question: With transparency I assume you can set how visible a window should be? Maybe it would be better with an Option<f32> instead of a bool where the Some(0.5) would be 50% transparency, Some(0.75) 75% etc

nyovaya commented 4 years ago

@emoon This would be possible to implement in theory, but needs to be simulated. The plan here is to allow alpha transparency for windows, where the dev can draw (semi)transparent RGBA data to the window.

emoon commented 4 years ago

Alright. Then I guess a bool makes more sense

nyovaya commented 4 years ago

X11 is now working too(but requires an compositor). @emoon Can you research on how to do this on OSX and implement the code for it?

nyovaya commented 4 years ago

Seems like I am not able to currently implement transparency so far(as of time and experience with windows and osx). @emoon Would it be possible to review this and merge the linux/bsd/etc. implementation and the windows/osx implementation would come later?

emoon commented 4 years ago

Yes that is fine. Should I merge these changes now?

nyovaya commented 4 years ago

@emoon Next time I push Id be ready.

emoon commented 4 years ago

ok, good to merge now?

nyovaya commented 4 years ago

Yes