Port Ogre to Android?

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

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
0 x

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
Contact:

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.
0 x

User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
Contact:

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?
0 x

User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
Contact:

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?
0 x

User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US

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.
0 x
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

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

Thanks
0 x

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

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
0 x

CheetahShrk
Kobold
Posts: 38
Joined: Wed Dec 13, 2006 4:52 am

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.
0 x

User avatar
CoreDumped
Gremlin
Posts: 177
Joined: Sun Aug 05, 2007 3:55 pm

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]
0 x

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

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
0 x

User avatar
CaseyB
OGRE Contributor
OGRE Contributor
Posts: 1335
Joined: Sun Nov 20, 2005 2:42 pm
Location: Columbus, Ohio
Contact:

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.
0 x
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?

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?
0 x

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7130
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia

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.
0 x

User avatar
liberator
Greenskin
Posts: 117
Joined: Mon Jan 24, 2005 2:27 pm
Location: Sillicon Valley, California
Contact:

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 :(
0 x

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7130
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia

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.
0 x

User avatar
SomeFusion
Gremlin
Posts: 191
Joined: Sun Dec 01, 2002 12:38 am

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.
0 x
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

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?
0 x

User avatar
andrewfenn
Halfling
Posts: 62
Joined: Fri Mar 23, 2007 2:48 pm

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.
0 x

warmi
Gnoll
Posts: 674
Joined: Sun May 27, 2007 3:56 am
Location: USA

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 ).
0 x

User avatar
stoneCold
OGRE Expert User
OGRE Expert User
Posts: 867
Joined: Fri Oct 01, 2004 9:13 pm
Location: Carinthia, Austria

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).
0 x

User avatar
liberator
Greenskin
Posts: 117
Joined: Mon Jan 24, 2005 2:27 pm
Location: Sillicon Valley, California
Contact:

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).
0 x

User avatar
SomeFusion
Gremlin
Posts: 191
Joined: Sun Dec 01, 2002 12:38 am

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
0 x
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: 25
Joined: Sun Mar 06, 2005 5:16 pm

Re: Port Ogre to Android?

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

Hi, I'm interested in using Ogre on Android. :)
0 x

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
Contact:

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.
0 x
Watch out for my OGRE related tweets here.

User avatar
calsmurf2904
Orc
Posts: 401
Joined: Tue Sep 16, 2008 9:39 pm
Location: Netherlands
Contact:

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


Return to “Using OGRE in practice”

Who is online

Users browsing this forum: No registered users and 4 guests