A little explanation on how to build for Android:
0. Clone https://bitbucket.org/Sebastian_Bugiu/ogre and switch to gles3-android branch. Get the Android SDK and NDK in working order, set the paths etc.
1. Build ogredeps for android using the Unix makefiles settings and the android toolchain file in ogredeps/cmake. Both ogre and ogredeps and the project that you're building have to be build with the same ANDROID_NATIVE_API_LEVEL. I recommend version 19 since the newer versions have problems with the FreeImage library in ogredeps (you could try building a newer version of FreeImage but I haven't tried). The ANDROID_ABI should be armeabi-v7a with NEON.
2. Build ogre with android toolchain in cmake folder. Again, use the same settings for building as with ogredeps. Make sure that BUILD_RENDERSYSTEM_GLES is disabled, but enable GLES3 and CONFIG_ENABLE_GLES3_SUPPORT. You should add the freetype, freeimage, zlib and zziplib libraries because they are needed for samples.
3. If you are too lazy to do all the above you can download the compiled libs for both ogredeps and ogre (they are built with android-19) from here: http://headwayentertainment.net/ogre_libs.zip
4. Now clone https://bitbucket.org/Sebastian_Bugiu/o ... ablesample, open the project in Android Studio and change the paths in CMakeLists.txt to where is your ogre path, where is the build path, where is ogredeps build path etc. like here:
Code: Select all
SET(OGRE_ANDROID_BUILD_INCLUDE_PATH d:/Sebi/projects/ogre_build_android2)
SET(OGRE_ZZIPLIB_PATH D:/Sebi/projects/ogredeps/src)
SET(OGRE_INCLUDE_PATH c:/Sebi/projects/ogre)
SET(OGREDEPS_BUILD_INCLUDE_PATH d:/Sebi/projects/ogre/Dependencies_android)
SET(OGRE_LIB_PATH d:/Sebi/projects/ogre_build_android2/lib)
SET(OGRE_DEPS_LIB_PATH d:/Sebi/projects/ogre/Dependencies_android/lib)
Code: Select all
#define CUSTOM_RENDERABLE 1
#define PBS_MATERIALS 2
#define SAMPLE PBS_MATERIALS
Of course, pull requests, bug reports etc. are welcome. I will maintain this fork in the future and if there is any wish to merge it with the main ogre repository it can be done since I will keep it up to date with the main line. But first I think it should be better tested by as many individuals as possible, iron out the problems and after it's stable, we can merge it.