Port Ogre to Android?

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
User avatar
CoreDumped
Gremlin
Posts: 177
Joined: Sun Aug 05, 2007 3:55 pm
x 14

Port Ogre to Android?

Post 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
User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
x 3
Contact:

Post 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.
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Post 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?
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post 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?
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

The OpenGLES port was done a long time ago by the guy who made the PocketPC port. Search in the forums here.
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
CoreDumped
Gremlin
Posts: 177
Joined: Sun Aug 05, 2007 3:55 pm
x 14

Post by CoreDumped »

Thanks
kcbanner
Goblin
Posts: 208
Joined: Sat May 05, 2007 4:49 pm

Post by kcbanner »

Android currently just supports Java programs I thought? This would mean a port of Ogre to Java, ouch :P
CheetahShrk
Kobold
Posts: 38
Joined: Wed Dec 13, 2006 4:52 am

Post 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.
User avatar
CoreDumped
Gremlin
Posts: 177
Joined: Sun Aug 05, 2007 3:55 pm
x 14

Post 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]
kcbanner
Goblin
Posts: 208
Joined: Sat May 05, 2007 4:49 pm

Post by kcbanner »

Oh wow this is cool indeed :)...so when do we get the OpenGL ES plugin for Ogre :p
User avatar
CaseyB
OGRE Contributor
OGRE Contributor
Posts: 1335
Joined: Sun Nov 20, 2005 2:42 pm
Location: Columbus, Ohio
x 3
Contact:

Post 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.
Image
Image
User avatar
liberator
Greenskin
Posts: 117
Joined: Mon Jan 24, 2005 2:27 pm
Location: Sillicon Valley, California
Contact:

Re: Port Ogre to Android?

Post 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?
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Port Ogre to Android?

Post 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.
User avatar
liberator
Greenskin
Posts: 117
Joined: Mon Jan 24, 2005 2:27 pm
Location: Sillicon Valley, California
Contact:

Re: Port Ogre to Android?

Post 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 :(
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Port Ogre to Android?

Post 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.
User avatar
SomeFusion
Gremlin
Posts: 191
Joined: Sun Dec 01, 2002 12:38 am
x 3

Re: Port Ogre to Android?

Post 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.
Summoning Wars is an open source role-playing game, featuring both a single-player and a multiplayer mode for about 2 to 8 players.
http://www.sumwars.org
User avatar
liberator
Greenskin
Posts: 117
Joined: Mon Jan 24, 2005 2:27 pm
Location: Sillicon Valley, California
Contact:

Introducing Android 1.5 NDK, Release 1

Post 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?
andrewfenn
Halfling
Posts: 62
Joined: Fri Mar 23, 2007 2:48 pm
x 2

Re: Port Ogre to Android?

Post 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.
warmi
Gnoll
Posts: 674
Joined: Sun May 27, 2007 3:56 am
Location: USA

Re: Port Ogre to Android?

Post 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 ).
User avatar
stoneCold
OGRE Expert User
OGRE Expert User
Posts: 867
Joined: Fri Oct 01, 2004 9:13 pm
Location: Carinthia, Austria
x 1

Re: Port Ogre to Android?

Post 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).
User avatar
liberator
Greenskin
Posts: 117
Joined: Mon Jan 24, 2005 2:27 pm
Location: Sillicon Valley, California
Contact:

Re: Port Ogre to Android?

Post 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).
User avatar
SomeFusion
Gremlin
Posts: 191
Joined: Sun Dec 01, 2002 12:38 am
x 3

Re: Port Ogre to Android?

Post 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
Summoning Wars is an open source role-playing game, featuring both a single-player and a multiplayer mode for about 2 to 8 players.
http://www.sumwars.org
motif
Kobold
Posts: 32
Joined: Sun Mar 06, 2005 5:16 pm

Re: Port Ogre to Android?

Post by motif »

Hi, I'm interested in using Ogre on Android. :)
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: Port Ogre to Android?

Post 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.
Watch out for my OGRE related tweets here.
User avatar
calsmurf2904
Orc
Posts: 401
Joined: Tue Sep 16, 2008 9:39 pm
Location: Netherlands

Re: Port Ogre to Android?

Post 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.
Visit my blog at http://calsmurf2904.wordpress.com !
Got a Google Wave account? Add me as contact! (projectxgame <at> gmail <dot> com)
Image
Post Reply