HI all.
As most of you know , Apple announced about deprecation of OpenGL & OpenGL-ES on its devices.
There is still a grace period that allows to use them , but its matter of time until they will pull the plug.
As a result Urho3D won’t run on Apple devices anymore in the future.
The last couple of weeks I was working on a solution by using 2 open source libraries :
1 - ANGLE ( Almost Native Graphics Layer Engine ) , an open source BSD licensed abstraction developed by Google , basically an OpenGL-ES abstraction running on top of DirectX/Vulkan backends.
2- MoltenVK , its an Vulkan abstraction running on top of Metal on iOS and Mac , Appache 2 license , developed by The Brenwill Workshop Ltd .
Both of these libraries are actively developed by big cooperates and there are daily fixes and improvements.
I completed the work successfully .
So basically it’s an OpenGL-ES running on top of Metal , using liberal open source libraries.
You can find the code in : https://github.com/elix22/Urho3D/tree/angle-vulkan
It’s on the angle-vulkan branch.
You can clone it using : git clone -b angle-vulkan https://github.com/elix22/Urho3D.git
There are 4 scripts that will create for you the Xcode projects :
cmake_ios-metal.sh - will create an iOS Xcode project using the metal backend (my work)
cmake_ios-gles.sh - will create an iOS Xcode project using the default OpenGL-ES backend
cmake_xcode-metal.sh - will create an Mac Xcode project using the metal backend (my work)
cmake_xcode-gl.sh - will create an Mac Xcode project using the default OpenGL-ES backend
These are all debug builds .
In order to get the best performance you will have to modify the scheme to release build configuration and also disable metal API validation .
All the samples seem to work on my iPad .
On my Mac all are working except 10_RenderToTexture.
The performance is great , getting stable 60 FPS on my iPAD in release configuration.
Known issues :
- On my Mac , once exiting from the app , it crashes , I will try to provide a fix for that in the coming weeks.
- Shadows are disabled due to missing functionality on Angle side, needs some investigation
- I disabled HDPI for now , not working properly , it needs more investigation.
I plan to write a blog in the coming weeks describing the inner workings of the implementation to help other developers continue improving this solution and to incorporate it into other game engines.
You are encouraged to try it ( a specially on iOS devices) and provide some feedback .
Enjoy !