rust_minifb icon indicating copy to clipboard operation
rust_minifb copied to clipboard

Not support macOS without Metal API

Open kylixs opened this issue 4 years ago • 4 comments

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 ?

kylixs avatar Feb 01 '20 03:02 kylixs

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.

emoon avatar Feb 01 '20 06:02 emoon

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。

kylixs avatar Feb 01 '20 09:02 kylixs

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.

emoon avatar Feb 01 '20 09:02 emoon

Working on an older macbook without metal support I would love to see OpenGL support

laszlokorte avatar May 07 '20 18:05 laszlokorte

Closing this as I think it's out of scope for me to add support for this.

emoon avatar Dec 28 '22 12:12 emoon