so we have our game engine currently powering our flagship product and other games, and the backbone of it was written in OpenGL Es and can both compiled in ios and android as both platform shared it. (and since its OGL, we can code in desktop with/without simulator but straight up desktop app).
Its fairly straightforward as both android and ios shares opengl in native form (NDK for android and straight C++ in ios). In this way, the game can be written in straight up C++ and will/can run on both platforms.
but now we are considering updating our engine after we released our current project to address the deprecation of OpenGL ES support on latest Xcode/IOS or Mac in general, like when you create a new project in Xcode, there is no more option for Opengl based app in there and needs to be added/referenced manualy, so I assume, moving forward, if we want cross platform compatibility, we can no longer use the same approach as metal I assume is only available in Swift, that is if my assumption is correct. Therefore we can no longer write an entire game in C++ and run on both.
What are the approach/option we can do? doing a simple search i see that there is objectc access to metal and some guys written a C++ wrapper to metal. But I'd like to hear the opinion of the industry so that is why i posted it here as I always do for years. I am also looking for resources or sample projects on engines who did make an engine that works in both opengl es and metal if there are available (or a doc, video, tutorials, etc).
Let me know what you think. We havent dig deep into this yet, just doing preparations as we are about to lunch our game, any feedback will be used as our starting point of our research.
thank you in advance.
Design suggestion on updating our engine
How actually obsolete is OpenGL ES on iOS? Demotion from suggested project type to generic libraries in Xcode seems a pretty soft form of deprecation: what matters is whether the games you develop now are going to work flawlessly enough in a few years on updated iOS versions and on new Apple devices.
If you bet on the worst case, i.e. OpenGL ES going away too soon to make one more game that targets iOS with the same engine, adopting libraries that can be used in C++ and implement an OpenGL ES emulation on top of an actually supported API (Metal or maybe Vulkan) should be the minimum impact change that makes your engine future-proof.
But maybe you have other needs, necessitating deeper architecture and strategy changes (e.g. dropping iOS support because it's not worth it or adopting a third party engine).
Omae Wa Mou Shindeiru