rust_minifb
rust_minifb copied to clipboard
Not support macOS without Metal API
My MacBook Pro is Late 2011, without Metal API, the following error occurred at cargo run:
Your device/OS doesn't support Metal.
I found that minifb project had a compatibility parameter USE_METAL_API suitable for this scenario : https://github.com/emoon/minifb/blob/master/src/macosx/MacMiniFB.m
orbtk project is rely on rust_minifb, so orbtk not work on my macOS. Can someone handle it ?
The problem is that the later versions of the SDK doesn't support the non-Metal path and converting the code over to Metal made the macOS version quite a bit faster.
I could have went with OpenGL also but OpenGL is deprecated to use https://www.anandtech.com/show/12894/apple-deprecates-opengl-across-all-oses
If someone wants to open a PR to support OpenGL under macOS I would considering accepting if it's written in a way that works nice with the current code.
We can use the feature option to turn on the non-metal mode, corresponding to the USE_METAL_API flag。Use Metal mode by default。
It's not only to switch on and off, OpenGL needs to be implemented otherwise there will be a performance regression when not using Metal. It's also added maintenance cost with more code paths to support.
Working on an older macbook without metal support I would love to see OpenGL support
Closing this as I think it's out of scope for me to add support for this.