Right now i am improving the ogre android support most of my work is available here (except the demo) -> https://bitbucket.org/wolfmanfx/ogre
here a screenshot from my acer a200 device (tegra 2) / GLES 2.0 with active RTSS But what i have improved until now?
The situation until now was so that the complete application was Java centric so java code was use to create the context and passed to ogre. Also many users were confused why the resources inside a apk were renamed as mp3 or why the gamekit guys extracted the content to sdcard and read from there.
1) I do not use any java code everything is written in c++ via native_activity.
2) The GLContext is now created by ogre - i reworked the android support so that it conforms ogre's EGL structure but we need to pass the android window handle to ogre to make it happen
Code: Select all
Ogre::NameValuePairList opt; opt["externalWindowHandle"] = Ogre::StringConverter::toString((int)app->window); Ogre::RenderWindow* pRenderWnd = engine->pRoot->createRenderWindow("OgreWindow", 1280, 800, false, &opt);
4) Add Android log listener into OgreRoot (so we have always log output)
5) Add OgreAPKFileSystemArchive to handle file access inside the apk using android asset manager
Add OgreAPKZipArchive so we can handle zip files inside the apk (apk is also compressed using zip)
I think this useful for everybody - we can access everything inside the apk file but we have to register this two archives manually
Code: Select all
Ogre::ArchiveManager::getSingleton().addArchiveFactory( new Ogre::APKFileSystemArchiveFactory(app->activity->assetManager) ); Ogre::ArchiveManager::getSingleton().addArchiveFactory( new Ogre::APKZipArchiveFactory(app->activity->assetManager) );
But i still use eclipse to create the apk - but maybe there will the possibility to create also the apk with cmake - we will see.