not-fl3 / miniquad

Cross platform rendering in Rust
Apache License 2.0
1.54k stars 173 forks source link

native/macos: Fixes setNeedsDisplay call on arm macs #476

Closed birhburh closed 1 month ago

birhburh commented 1 month ago

Possible fix for: https://github.com/not-fl3/miniquad/issues/470#issuecomment-2284167669

If I had a nickel for every time I needed to use setNeedsDisplay hack, I'd have two nickels. Which isn't a lot, but it's weird that it happened twice

@brettchalupa, can you please recheck now And with metal also, please, just to be sure (cargo run --example quad metal)

brettchalupa commented 1 month ago

@birhburh confirmed that cargo run --release --example triangle runs on macOS on Silicon and does not seg fault. Also CPU usage is much lower, at about 8% with that example.

I confirmed cargo run --example quad metal runs as well and uses lower CPU usage.

Nice! 🙌