Anyone aware of a means to dynamically detect if OpenGL is present and can therefore be used on a given MacOS X version on the specific machine it is running on?
@Ed K Anyone aware of a means to dynamically detect if OpenGL is present and can therefore be used on a given MacOS X version on the specific machine it is running on?
I'm wondering if this is fruitful since if your app requires OpenGL it wont start on a machine without OpenGL (at least thats what I would expect)
Effectively OpenGL would be a missing dependency
I suppose the other option would be to see if you can create an NSOpenGLContext and if that fails then its very likely OpenGL is not available in any way thats useful
@Bob K Deprecated but not removed. Yet. The Catalina beta's all still have it.
I found building on 10.14.x with latest xojo 2019, OpenGL would not work as expected, namely a black screen. Building with with 2018rX worked though. (I think those were the versions)
We exposed all the metal classes and rewrote for that. It is a lot more complex than OpenGL, well the simple 2d stuff I was doing was. You needed a lot of classes just to get a triangle showing :P
In total there are around 130 classes to support all features. There are some neat features as well, like iosurfaces to share memory with gpu between apps so you can load textures etc in a helper app and push to gpu.
As for detecting when to support OpenGL we just disabled for 10.14.x and above, forcing users to metal, which ran a lot better.
The code isn't mine to sell :( and also don't be too impressed, I didn't expose all the functionality behind the classes, I just needed them as placeholders incase I needed to use them.
I would be happy to help anyone get started on it as well. The more people understanding it the better for when apple screw it all up in the next release. @Sam R got me started on the basics.
@Brian OBrien I think we need a metal canvas.
Yes & No. My experience is based solely on using Metal as a display portal for Core Image rendering.
Unless you're specifically targeting Apple only devices, look at alternative solutions.