Cinder Forum ARCHIVE
Hi Everyone,
It’s with great excitement that I have the honor of sharing this with you. For the past 6 months or so, we’ve been working hard on an Android port of Cinder. While it’s not 100% yet and very much a Work In Progress, we’d like to share this with you all to play with and offer any feedback you may have.
Currently, the port lives here: https://github.com/chaoticbob/Cinder/tree/android
The Getting Started Guide is here: https://github.com/chaoticbob/Cinder/wiki
Working samples: https://github.com/chaoticbob/Cinder/wiki/Working-Samples
A bit of history for context. First and foremost, this is certainly not first port of Cinder to Android, previous work done by Dan and Ariel. Secondly, Andrew helped me think through the high-level approach, and there were many contributing factors as to why a fresh start seemed like the right choice. Here are the main ones as best as I can remember::
app_recfactor was almost done. From an under the hood perspective, this is the single largest change to Cinder’s app infrastructure since the initial release. This change made clear delineation between 0.9 and anything before it. Rich’s work on this enabled quick work on creating the “app” parts for Android.
glNext was pretty much finished. Similar to app_refactor, this was also a massive change. Unlike app_refactor, this more directly impacted client facing code. Andrew, Paul, Rich and Ryan’s work on this made it easy to write an Android specific RendererGL for OpenGL ES 3.
Android’s past, present, and future. Based on what was happening with Android itself and the NDK, Android 4.4 made the most sense for us to start. Android 5.0 had been out for a while but the market size was still relatively small. We also knew that by the time we made any announcements, there would be another version of Android on the horizon. Google just recently announced Android 6.
What’s involved in getting going with Cinder for Android?
Cinder for Android makes use of CMake and the NDK to build the Cinder library itself. CMake 3.1 or later is required. Currently, it is necessary to build the library from the command line. Applications are built using Android Studio 1.3. In the course of development we’ve been through several version of Android Studio.
See the Getting Started Guide for more details.
Note: Google is fast at work on making Android Studio what it should be for C++ on Android. As new versions of Android Studio are released, we make use of the features that make sense for Cinder. Because Android Studio is so fast moving, there may certain punctuated points where one version of Android Studio will not work. When this happens, we will make the community aware of this.
What currently works?
The following are are known to work:
OpenGL ES 3
OpenGL ES 2
Text rendering using FreeType (TextLayout and gl::TextureFont)
Multi-touch Input
Motion sensor
Cameras
Video playback
Asset loading via loadAsset
loadResource is internally remapped to loadAsset (assumes resources is treated as an asset directory)
loadUrl
What doesn’t work?
Audio and ASIO are two of the large remaining items on the to do list. Cairo and friends also do not work - we’re still figuring out what to do with this on Android.
What versions of Android are supported?
Currently the following versions are known to work:
Android 4.4 (Kitkat)
Android 5.0 (Lollipop)
Android 5.1 (Lollipop)
Has anything been created with Cinder for Android?
Yes! David Wicks and Simon Geilfus have created two amazing projects with it. David made the awesomely trippy Selfie x Selfie and Simon made the gorgeous Grove. Thanks to both David and Simon for enduring the in progress work for Cinder for Android as they worked on their projects. They both provided very valuable bug fixes and feedback.
What’s next?
Audio and Android 6 will be the next major areas of focus. In parallel to that will also be bug fixes and filling the missing gaps such as location services, virtual keyboard input, etc. Followed by more sample updates. Lastly, sorting through the Android fragmentation bits.
How can I help?
Well, I’m glad you asked! As with any open source projects, there are a variety of ways to contribute: Pull requests for fixes, features, feedback, bug reports, etc. Creating a fork and using it in your own projects and creations and participating in the discussion is the best way to get started. If you have expertise in any particular area of Android, we’d love to hear your thoughts and of course feel free to contribute via pull requests as well.
There are still a lot of small things to nail down. We’re hoping that the community can help us identify as many of these as possible. While we hope to be as thorough as possible, we do have certain limitations of use cases because of the nature of our work. The Cinder community is filled with a variety of the brightest and sharpest creative technical minds. It’s our hope that this variety helps make a stronger Cinder.
What’s up with the Linux directories in the Android branch?
This is your bonus for reading this post. :) I’ve also started layout the groundwork for an eventual Linux port, is is in the very early stages, barely anything works as expected, and very much in flux. You’re welcome to check it out - at your own risk :). When the port gets to a reasonable place, we’d love comments and feedback. Unfortunately, it is not there yet. But stay tuned.
...and now screenshots from the samples!
_opengl/Cube: