Vulkan on Android: first dev impressions
Tue, 27 Dec 2016 18:53:40 +0000
As you may know, Vulkan is the Khronos Group equivalent to Microsoft's DirectX 12 or Apple's Metal, a modern graphics API. I've been playing a bit with Vulkan on Android, mostly following tutorials online and setting up a build environment. Starting from the conclusions first, I would say Vulkan is not quite ready for prime time just yet. Here are some of the reasons:

  • Very little supported devices: Nexus 5X, 6P, Samsung Galaxy S7. In contrast, Metal for iOS has been around for a couple of years already, so anything from iPhone5S onwards supports Metal.
  • Poor documentation. The official guide helps you get started by showing you how to build some examples, although the documentation is a bit out of date and I encountered problems with the latest version of Android Studio. In any case, the guide doesn't tell you how to setup a project from scratch. In contrast, you can start a Metal project easily in Xcode by simply selecting a Metal template when creating a new project.
  • Not many online tutorials. Google provides these samples, android-vulkan-tutorials, but again, it doesn't tell you how to start your own project. Other good tutorials, like vulkan-tutorial, do not provide setup instructions for Android.
  • Poor integration with Android libraries. Because you have to write your Vulkan code in C++, I suspect the communication with your Java libraries is going to be a nightmare. If you write your app using OpenGL ES, you can write everything in Java and you can use all the available libraries easily. Similarly, Metal can be written all in Swift, not only making it slightly easier to write, but also enabling an easier integration with the rest of iOS libraries. An example of this would be using an existing VideoPlayer to stream some video and then getting hold of the video texture to pass it to a Metal surface. The communication between native libraries and Java to get hold of that video texture in Vulkan sounds overwhelming at the moment.

References for the brave,

And if you are more interested in Metal,

Happy coding

 
Newer|Older

Previous year

Next year