Port Ogre to Android?

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.

Port Ogre to Android?

Postby CoreDumped » Mon Dec 03, 2007 12:34 pm

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
CoreDumped
Gremlin
 
Posts: 177
Kudos: 14
Joined: 05 Aug 2007

Postby Praetor » Mon Dec 03, 2007 3:02 pm

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
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
 
Posts: 3335
Kudos: 3
Joined: 21 Jun 2005
Location: Rochester, New York, US

Postby Klaim » Mon Dec 03, 2007 3:07 pm

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
Klaim
Old One
 
Posts: 2565
Kudos: 60
Joined: 11 Sep 2005
Location: Paris, France

Postby PolyVox » Mon Dec 03, 2007 4:23 pm

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
PolyVox
OGRE Contributor
OGRE Contributor
 
Posts: 1316
Kudos: 18
Joined: 21 Nov 2006
Location: Groningen, The Netherlands

Postby xavier » Mon Dec 03, 2007 6:21 pm

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
xavier
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 9481
Kudos: 23
Joined: 18 Feb 2005
Location: Dublin, CA, US

Postby CoreDumped » Mon Dec 03, 2007 8:24 pm

Thanks
User avatar
CoreDumped
Gremlin
 
Posts: 177
Kudos: 14
Joined: 05 Aug 2007

Postby kcbanner » Mon Dec 03, 2007 9:38 pm

Android currently just supports Java programs I thought? This would mean a port of Ogre to Java, ouch :P
kcbanner
Goblin
 
Posts: 208
Kudos: 0
Joined: 05 May 2007

Postby CheetahShrk » Tue Dec 04, 2007 1:01 am

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.
CheetahShrk
Kobold
 
Posts: 38
Kudos: 0
Joined: 13 Dec 2006

Postby CoreDumped » Tue Dec 04, 2007 6:49 am

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]
User avatar
CoreDumped
Gremlin
 
Posts: 177
Kudos: 14
Joined: 05 Aug 2007

Postby kcbanner » Tue Dec 04, 2007 9:35 pm

Oh wow this is cool indeed :)...so when do we get the OpenGL ES plugin for Ogre :p
kcbanner
Goblin
 
Posts: 208
Kudos: 0
Joined: 05 May 2007

Postby CaseyB » Tue Dec 04, 2007 10:26 pm

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
CaseyB
OGRE Contributor
OGRE Contributor
 
Posts: 1335
Kudos: 2
Joined: 20 Nov 2005
Location: Columbus, Ohio

Re: Port Ogre to Android?

Postby liberator » Fri Feb 13, 2009 1:28 am

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
liberator
Greenskin
 
Posts: 117
Kudos: 0
Joined: 24 Jan 2005
Location: Sillicon Valley, California

Re: Port Ogre to Android?

Postby Kojack » Fri Feb 13, 2009 8:57 am

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
Kojack
OGRE Moderator
OGRE Moderator
 
Posts: 7127
Kudos: 516
Joined: 25 Jan 2004
Location: Brisbane, Australia

Re: Port Ogre to Android?

Postby liberator » Fri Feb 13, 2009 6:54 pm

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
liberator
Greenskin
 
Posts: 117
Kudos: 0
Joined: 24 Jan 2005
Location: Sillicon Valley, California

Re: Port Ogre to Android?

Postby Kojack » Fri Feb 13, 2009 7:48 pm

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
Kojack
OGRE Moderator
OGRE Moderator
 
Posts: 7127
Kudos: 516
Joined: 25 Jan 2004
Location: Brisbane, Australia

Re: Port Ogre to Android?

Postby SomeFusion » Sat Feb 14, 2009 12:23 pm

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
SomeFusion
Gremlin
 
Posts: 191
Kudos: 3
Joined: 01 Dec 2002

Introducing Android 1.5 NDK, Release 1

Postby liberator » Fri Jul 10, 2009 7:30 pm

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?
User avatar
liberator
Greenskin
 
Posts: 117
Kudos: 0
Joined: 24 Jan 2005
Location: Sillicon Valley, California

Re: Port Ogre to Android?

Postby andrewfenn » Mon Jul 13, 2009 2:18 pm

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.
User avatar
andrewfenn
Halfling
 
Posts: 62
Kudos: 2
Joined: 23 Mar 2007

Re: Port Ogre to Android?

Postby warmi » Mon Jul 13, 2009 4:23 pm

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 ).
warmi
Gnoll
 
Posts: 674
Kudos: 0
Joined: 27 May 2007
Location: USA

Re: Port Ogre to Android?

Postby stoneCold » Wed Aug 05, 2009 9:37 am

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
stoneCold
OGRE Expert User
OGRE Expert User
 
Posts: 867
Kudos: 0
Joined: 01 Oct 2004
Location: Carinthia, Austria

Re: Port Ogre to Android?

Postby liberator » Tue Oct 06, 2009 10:26 pm

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
liberator
Greenskin
 
Posts: 117
Kudos: 0
Joined: 24 Jan 2005
Location: Sillicon Valley, California

Re: Port Ogre to Android?

Postby SomeFusion » Wed Oct 07, 2009 4:53 pm

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
User avatar
SomeFusion
Gremlin
 
Posts: 191
Kudos: 3
Joined: 01 Dec 2002

Re: Port Ogre to Android?

Postby motif » Wed Jan 06, 2010 9:12 am

Hi, I'm interested in using Ogre on Android. :)
motif
Kobold
 
Posts: 25
Kudos: 0
Joined: 06 Mar 2005

Re: Port Ogre to Android?

Postby Assaf Raman » Wed Jan 06, 2010 9:42 am

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
Assaf Raman
OGRE Team Member
OGRE Team Member
 
Posts: 3092
Kudos: 79
Joined: 11 Apr 2006
Location: TLV, Israel

Re: Port Ogre to Android?

Postby calsmurf2904 » Wed Jan 06, 2010 6:39 pm

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
User avatar
calsmurf2904
Orc
 
Posts: 401
Kudos: 0
Joined: 16 Sep 2008
Location: Netherlands

Next

Return to Using OGRE in practice

Who is online

Users browsing this forum: No registered users and 3 guests