Android Port

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Android Port

      I have started a port of my engine, inspired by GCC3, to Android using the NDK NativeActivity which makes it fully C++ without a single line of Java needed.

      I really like my results so far and was wondering if anyone else would be interested in how it is done as I know it took me a while to research how to get everything working the first time and thought it could help others to progress.

      The reason I did it is because I had so much good code and I am very used to C++, as well as read using native code gives performance boost to programs and games are performance critical "apps".

      I think bringing our (individual indie programmers) code to Android is quite exciting :)
    • Hi gb,

      This is still very much at the beginning but I have got all the basic things working (Loading assets, setting up initial graphics). You can get me sample from here:

      shaneenishry.com/downloads/MLEMobile.rar

      You will need to set up NDK first with Eclipse (I tried vs-android to work with visual studio but had problems std related libraries), for this start by installing the Android SDK:
      developer.android.com/sdk/index.html

      Make sure to install Eclipse also.

      You can also follow the instructions I found here (step 1 and 2):
      philhassey.com/blog/2010/08/03…on-using-the-android-ndk/

      But only the Android installation and Eclipse related ones.

      Now I used CrystaX's compilation of the NDK so I have std support:
      crystax.net/en/android/ndk/7

      Now you can create a new android project via existing source and select my code, I am using SDK 10 but I think 8 should be ok too.

      Right now I just pretty much got started (which might have made this thread very pre-mature, but some people I talked to didn't know it was possible at all to make a whole project with C++ only for Android so I thought it would be useful!), the project shows how to load files in your Assets folder via NDK, how to render a texture, compile shaders, etc.

      Works well over my Galaxy S2 and Galaxy Tab 10.1.

      Won't work on the SDK's virtual devices as they do not support OpenGL ES 2.0.

      P.S. I am a newbie to OpenGL and if you can correct anything I may have done wrong let me know :)