A predicament with graphics - Metal vs. openGL

It may come as a surprise that not all Mac users constantly update their systems to the latest and greatest hardware and OS. I have some users working in established studios, for example, who are still on El Capitan or Sierra!

So, for the most compatibility, I have been building my plugins using openGL2 graphics. To my surprise they still work on OS Monterey (on Intel) - but for how long? I don’t know if they work at all on arm/M1 systems as I currently have no hardware to test it.

I know we can’t support older systems forever but how is the best way to handle this? “Metal” graphics has only been around for ~7 years so it’s not that old - yet, AFAIK, Apple already deprecated openGL2 back on OS Mojave. I suppose we could build multiple versions of plugins for Mac but that’s not very maintenance-friendly, especially now that we have “arm” to deal with as well.

What are you doing with your Mac builds and what do you suggest? How are you handling both the “new” and the “old” now that there are so many different OSs and hardware in use?

Currently there’s no runtime switching. I suspect that in the not too distant future metal support will be sufficient.

I am shipping plugins with surreal machines using Skia CPU which bypasses all the hardware headaches (so neither of the two options from the title of the post). Given that the UI disappears when the window closes and runs in a separate thread to the audio that seems fast enough for our purposes, even with meters. Of course, your mileage may vary. That’s my current solution to reduce support issues, but your situation might warrant a different answer.

Interesting. So you are not using “GPU” at all? I tried SKIA CPU at one time and it ran really sluggish on my QC iMac - so I dismissed it right away. Maybe your DSP code is light enough that CPU graphics works in your case? I will try it again but I assumed GPU rendering was always preferred in audio plugins to minimize CPU load.

Unfortunately, I have also found SKIA CPU mode to be too slow on retina screens. This branch improves the frame rate, but still uses quite a lot of CPU.

This branch adds an experimental run-time swap capability when using Skia, but doesn’t currently support OpenGL on macOS

Thank you for the input and links. I will look into all of it.

OpenGL is still working here on OS Monterey (on Intel), so until someone reports otherwise I will keep using it for now. The advantage is backward compatibility with older Macs that don’t support Metal.

BTW - I have found that the default iPlug2 code - that uses NanoVG - produces much sharper raster graphics than SKIA even with SKIA’s bitmap anti-aliasing disabled. Any idea why that would be? SKIA rendering of bitmaps (GUI backgrounds, etc.) appears “out of focus”/blurry compared to the same graphics rendered with NanoVG, especially when corner resizer is >1. Anyone else noticed this?