Page 1 of 10

Port Ogre to Android?

Posted: Mon Dec 03, 2007 12:34 pm
by CoreDumped
Android is a new linux based mobile platform developed by google for cellphones that will hit in late 2008

My question: Is it possible/feasible to port Ogre to the Android Platform?

It looks like Ogre was designed to work only with hardware accelerated platforms.

If its not feasible to port Ogre to Android, could any of you recommend another light weight open source rendering engine that I can use/port to a mobile platform like android

Thx in advance,
CoreDumped

Posted: Mon Dec 03, 2007 3:02 pm
by Praetor
Ogre is designed to be run on GPUs. However a port to Android would not be the first attempt to port Ogre to a mobile platform. Attemps have been made to create a RenderSystem for PocketPC which is not hardware rendered. It may be that a new AndroidRenderSystem is all that is needed (or nearly all) for this to work.

Posted: Mon Dec 03, 2007 3:07 pm
by Klaim
I'm not aware of the details of Android, but if the hadrware has a gpu (some embedded hardware have one), what (if not memory capacity) forbid us to use Ogre with OpenglES for example?

Posted: Mon Dec 03, 2007 4:23 pm
by PolyVox
Well according to this page http://code.google.com/android/what-is-android.html Android is indeed based on OpenGL|ES 1.0 (maybe that's what you meant). So presumably it would be possible to cut back the OpenGL renderer to work on it?

Posted: Mon Dec 03, 2007 6:21 pm
by xavier
The OpenGLES port was done a long time ago by the guy who made the PocketPC port. Search in the forums here.

Posted: Mon Dec 03, 2007 8:24 pm
by CoreDumped
Thanks

Posted: Mon Dec 03, 2007 9:38 pm
by kcbanner
Android currently just supports Java programs I thought? This would mean a port of Ogre to Java, ouch :P

Posted: Tue Dec 04, 2007 1:01 am
by CheetahShrk
kcbanner wrote:Android currently just supports Java programs I thought? This would mean a port of Ogre to Java, ouch :P
The java support only at the moment is only because the rest of the android SDK and o/s is not complete, it will have c++ later on.

Posted: Tue Dec 04, 2007 6:49 am
by CoreDumped
we can run native code in the emulator
http://benno.id.au/blog/2007/11/13/android-native-apps

BTW, some people have already ported their native 3d engines to android and its working with the emulator.[/url][/list]

Posted: Tue Dec 04, 2007 9:35 pm
by kcbanner
Oh wow this is cool indeed :)...so when do we get the OpenGL ES plugin for Ogre :p

Posted: Tue Dec 04, 2007 10:26 pm
by CaseyB
There is a start of an OpenGL | ES RenderSystem in the PocketPC addon. I posted a message on that forum a while back asking if it was complete and working or just a start and I didn't get any answer. At the absolute least it should be good to look at, you may be surprised.

Re: Port Ogre to Android?

Posted: Fri Feb 13, 2009 1:28 am
by liberator
I was wondering about an Ogre port to Android now that Android has hit the market.
I'm thinking about buying an Android phone myself (probably a HTC model). Considering when the last post in this thread was made I'm wondering whether it is time to give Ogre on Android another look?

Who else is interested in this?

Re: Port Ogre to Android?

Posted: Fri Feb 13, 2009 8:57 am
by Kojack
An ogre port to the Palm Pre would be awesome, it's got a DX10 level gfx chip (geometry shaders, the lot!). But they currently won't let developers touch the 3d chip, all apps have to be written in javascript and html.

Android has a similar problem, it still only supports apps written in Java. The page with the info on how to get C apps working on android says that there's currently no way to access the gfx chip or other parts, since only the java api is documented.

Until google release a c++ sdk or somebody reverse engineers the hardware and writes some linux drivers for it, there won't be an android ogre.

Re: Port Ogre to Android?

Posted: Fri Feb 13, 2009 6:54 pm
by liberator
Here is a message from Dave Sparks (works on Android afaik)
http://markmail.org/message/iskie3p6daq ... te:results

Feb 5, 2009 11:28:43 pm
We do intend to support native code development in the future. We just want to take time to refine the native API's before we make them public. There is nothing more painful than changing an API because you overlooked something and then having to support the legacy API for years to come.
So it looks like they changed there mind since 2007 and will be supporting native code by providing API's for them in the future :D . Downside being that the future is not today so we have to wait a bit longer :(

Re: Port Ogre to Android?

Posted: Fri Feb 13, 2009 7:48 pm
by Kojack
Hmm, looks like australia might be getting an android phone next week. Optus are going to sell the HTC Dream.
The Kogan Agora android phone would have been out by now, but it was cancelled (they made the screen too small for most android apps). Oh well. It looked a lot better than the Dream, but the screen was way too small.
Well, too small for a pocket computer / phone, but fine for a phone. (I like separate gadgets, I carry a pda, an mp3 player and a phone. If the batteries go dead in one, that doesn't stop me using the other 2).

Hopefully google's idea of "in the future" for a native code sdk isn't too far away.

Re: Port Ogre to Android?

Posted: Sat Feb 14, 2009 12:23 pm
by SomeFusion
It is possible to compile to native code on an unmodified g1. Someone has ported scummvm to the g1.
http://forums.scummvm.org/viewtopic.php ... ht=android

I have tried it on my g1 and it indeed does work. I'm just not sure how exactly the process works to compile and make it running on the g1.

Introducing Android 1.5 NDK, Release 1

Posted: Fri Jul 10, 2009 7:30 pm
by liberator
See the following news posts:

http://android-developers.blogspot.com/ ... ase-1.html
http://www.brighthand.com/default.asp?newsID=15381

Since native support is now available porting libraries to Android such as Ogre is now more realistic. I'd like to know if anyone has already looked into this or is planning to?

Re: Port Ogre to Android?

Posted: Mon Jul 13, 2009 2:18 pm
by andrewfenn
I've looked into this and am planning to do it however at the moment Android's NDK (native development kit) doesn't contain OpenGL ES access and lacks STL containers (?) which I believe would be required to compile Ogre on the platform.

Re: Port Ogre to Android?

Posted: Mon Jul 13, 2009 4:23 pm
by warmi
Kojack wrote:An ogre port to the Palm Pre would be awesome, it's got a DX10 level gfx chip (geometry shaders, the lot!). But they currently won't let developers touch the 3d chip, all apps have to be written in javascript and html.

Android has a similar problem, it still only supports apps written in Java. The page with the info on how to get C apps working on android says that there's currently no way to access the gfx chip or other parts, since only the java api is documented.

Until google release a c++ sdk or somebody reverse engineers the hardware and writes some linux drivers for it, there won't be an android ogre.
Actually Palm Pre contains the SGX530 chip , which is basically DirectX 9.x level hardware ( the same as in the latest iPhone except a tad slower ).

Re: Port Ogre to Android?

Posted: Wed Aug 05, 2009 9:37 am
by stoneCold
andrewfenn wrote:... and lacks STL containers (?) which I believe would be required to compile Ogre on the platform.
Right, but you could maybe use STLPort to overcome this issue.
Although I guess that the performance would be far from adequate, after reading this...

After all, Ogre might already be too heavyweight for "real" use on devices such as the new HTC Hero
(which will definately be my next mobile phone, finally HTC/Google managed to come up with an iPhone killer :D).

Re: Port Ogre to Android?

Posted: Tue Oct 06, 2009 10:26 pm
by liberator
With the 1.6 NDK OpenGL ES support is now available to native code (among other things):
http://dl.google.com/android/ndk/

The NDK is now more usable then the previous release which was truly just the bare bare minimum for native dev.
Although performance will remain a question I think it is now certainly doable to port Ogre to Android. Performance issues could potentially be solved by trimming some "fat" off of Ogre and build an Ogre-light for these kinds of embedded applications. It can still provide a performance improvement over running everything in Dalvik. More importantly though is the reuse potential of the enormous C++ code stockpile.

I'd like to hear what people's thoughts are on the 1.6 NDK and thought on porting Ogre(-light?) to Android based on what we know today (leveraging the 1.6NDK).

Re: Port Ogre to Android?

Posted: Wed Oct 07, 2009 4:53 pm
by SomeFusion
I think this should be possible with the new NDK. Bullet has already been ported to Android without any modifications. See here:
http://bulletphysics.com/Bullet/phpBB3/ ... f=9&t=4158

Re: Port Ogre to Android?

Posted: Wed Jan 06, 2010 9:12 am
by motif
Hi, I'm interested in using Ogre on Android. :)

Re: Port Ogre to Android?

Posted: Wed Jan 06, 2010 9:42 am
by Assaf Raman
OGRE has not been ported to Android.
The two main gaps in the current Android NDK are:
1. Exceptions are not supported.
2. RTTI is not supported.

From the two - exception support is the more important one - we use exceptions heavily in OGRE.
Bottom line - until the guys at google decide to add exception support - I don't see anyone finishing this type of port, seems like a waste of time to create a workaround for exception handling that will become absolute as soon as they will add that support.

You are still welcome to try to create such a port - but I recommend discussing in the forum any idea to replace exception handling before you start working on it.

To read more why exceptions are not supported on Android yet - read this thread.

I guess that if I really needed an Android port - the best approach would be to add exception support to Android itself, it is open source after all.

Re: Port Ogre to Android?

Posted: Wed Jan 06, 2010 6:39 pm
by calsmurf2904
Look at the latest post, that guy says he created a lib for Android that allows exception handling. Dunno how good it is though.