OpenGL deprecated in IOS 12, how to safely continue to use openGL on ios 12+ device?
Asked Answered
H

3

12

Apple says that apps built using OpenGL ES will continue to run in iOS 12, but Open GL ES is deprecated in iOS 12. Games and graphics-intensive apps that previously used OpenGL ES should now adopt Metal.

But I don't want to migrate my app from OpenGL to Metal because it's the same code for Android and I don't want to create two separate branches, so what can I do to continue to use OpenGL in future iOS releases?

Hax answered 19/9, 2018 at 12:15 Comment(0)
A
14

You more or less do not.

Apple has made it abundantly clear that they are not interested in supporting OpenGL ES further on any platform they control. In the future, you will use Metal or you will not have accelerated 3D graphics. Those will be your options.

There are projects that expose OpenGL ES on such platforms by implementing an ES layer on top of Metal. MoltenGL, for example, but that one isn't free apparently.

Agate answered 19/9, 2018 at 13:50 Comment(4)
Good news! MoltenVK is now available as a free open-source project on GitHub :)Hax
@loki: OK, but MoltenVK isn't the same thing as MoltenGL. You'd have to switch to using Vulkan to use it rather than OpenGL.Agate
sad :( yes and i guess licence of MoltenGL will be very expensive :(Hax
MetalANGLE is free and open-source: see my answer below.Rhombic
R
5

I use MetalANGLE, which is free and open-source with a non-viral license, in my commercial product, as an (almost) drop-in replacement for GLKit. I have had to make no changes at all to the part of my code that uses OpenGL ES, and only minor changes to the way my View and ViewController classes were initialised.

It is now six months since I moved from GLKit to MetalANGLE and the only problem that arose was one of scaling, which was really a bug in my app: in MetalANGLE I needed to retrieve the UI scale from the View's contentScaleFactor rather than [[UIScreen mainScreen] scale].

There have been no display glitches, crashes, slowdowns, or any problems whatever with the graphics rendering.

I can therefore see no reason to pay for MoltenGL instead of using the free MetalANGLE.

Rhombic answered 26/10, 2021 at 14:22 Comment(0)
T
-3

I recommend that OpenGL and Metal are developed together on iOS, and new features are used with Metal.

Taipan answered 19/9, 2018 at 12:49 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.