Page 1 of 4

How do I use Irrlicht + XCode + iPhone SDK ??

Posted: Fri Feb 20, 2009 10:58 pm
by jaber
Hi.
I see that some people here used Irrlicht on iPhone and other mobile devices with that ogles driver branch thingy.

Well, how do I get started? From starting the Xcode to running the iPhone simulator? Tried googling but had no luck.

(grafikbot? hybrid?)

:?

Posted: Sat Feb 21, 2009 5:12 pm
by grafikrobot
The brief steps are:
  1. Make a basic iPhone project to start with.
  2. Compile Irrlicht by adding the sources to your project.
  3. Initialize the Irrlicht device by passing in the UIWindow as the windowID in the creation params.
  4. Do the usual Irrlicht rendering periodically.
I suggest you go through the OpenGL iPhone example projects to at least get an idea of what goes on overall.

Posted: Sun Feb 22, 2009 4:48 am
by jaber
Sorry but,
Could you give me more details on this? Like compiling irrlicht together with other components, how to passing parameters with createDeviceEx(), etc,etc.

Posted: Sun Feb 22, 2009 12:49 pm
by hybrid
Well, using Irrlicht for the iPhone is not as easy as with other, more common platforms. Better make yourself comfortable with Irrlicht on the usual PC platforms, then go for iPhone. Also make sure you understand the iPhone SDK completely before combining it with Irrlicht. Once you know both parts there shouldn't be too much problems to combine them.

Posted: Thu Feb 26, 2009 7:16 am
by tracerx
hybrid wrote:Well, using Irrlicht for the iPhone is not as easy as with other, more common platforms. Better make yourself comfortable with Irrlicht on the usual PC platforms, then go for iPhone. Also make sure you understand the iPhone SDK completely before combining it with Irrlicht. Once you know both parts there shouldn't be too much problems to combine them.
Hello. First post.

I'm evaluating 3d engines for iPhone. I'm looking for something that will take heightmaps and textures and give me terrain + skybox with a camera view. Also would like to be able to place a 3D objects x,y,z in that view and detect collision with the terrain/heightmap or another 3D object (or possibly billboarded 2D object if needed). I'm very familiar with iPhone at this point, but have only used OpenGLES to render in 2D up till now.

I've downloaded 1.5. I'm going to try and pull Irrlict into one of my iphone projects in Xcode. So my plan is to
1. Look at the MacOSX xcode project so I know which files to pull in.
2. pull those files into my project.
3. Look at one of the simple examples and try to get it working on iPhone.

The only thing missing in the 1.5 download seems to be the Opengles driver. Is there a link to download just that part? Or is that an entirely different download.

thanks!

Posted: Thu Feb 26, 2009 8:40 am
by hybrid
Yes, it's a completely separate branch. You can find the files here:
http://irrlicht.svn.sourceforge.net/vie ... es/ogl-es/
Either browse them with the SVN viewer, download them with the link at the bottom (GNU tarball), or use an SVN client to download the complete repository (path it branches/ogl-es).
Example 12 is doing all the things you want to do, so have a look at that tutorial. Should work without problems on the iPhone.

Posted: Thu Feb 26, 2009 7:16 pm
by tracerx
hybrid wrote:Yes, it's a completely separate branch. You can find the files here:
http://irrlicht.svn.sourceforge.net/vie ... es/ogl-es/
Either browse them with the SVN viewer, download them with the link at the bottom (GNU tarball), or use an SVN client to download the complete repository (path it branches/ogl-es).
Example 12 is doing all the things you want to do, so have a look at that tutorial. Should work without problems on the iPhone.
Thanks. For starters I tried compiling the example 12 with VC 6. It doesn't compile, there are a bunch of STL errors with notes. For now I'll just skip that and move on to the iPhone stuff. But its a little concerning.

Posted: Thu Feb 26, 2009 8:03 pm
by hybrid
VC6 is approx 10 years old - a time when no one ever thought about mobile devices with 3d apps. So maybe try with appropriate tools :roll: Moreover, Irrlicht dropped VC6 support about half a year ago, so, really get a better compiler.

Posted: Thu Feb 26, 2009 8:08 pm
by tracerx
hybrid wrote:VC6 is approx 10 years old - a time when no one ever thought about mobile devices with 3d apps. So maybe try with appropriate tools :roll: Moreover, Irrlicht dropped VC6 support about half a year ago, so, really get a better compiler.
Understood. I just saw it there so I thought I'd give it a shot. I also have VC.net 2002 and 2003 but there were no projects for those so I didn't bother.

I've pulled the first set of source files into my Xcode project. It will be great when there is a library (.a).

Posted: Thu Feb 26, 2009 8:14 pm
by hybrid
There should be an xcode project in the MacOSX folder. Some files are missing, but most stuff should be ok.
For Windows I'm using VS2008, so that project should work.

Posted: Thu Feb 26, 2009 8:25 pm
by tracerx
tracerx wrote:
hybrid wrote:VC6 is approx 10 years old - a time when no one ever thought about mobile devices with 3d apps. So maybe try with appropriate tools :roll: Moreover, Irrlicht dropped VC6 support about half a year ago, so, really get a better compiler.
Understood. I just saw it there so I thought I'd give it a shot. I also have VC.net 2002 and 2003 but there were no projects for those so I didn't bother.

I've pulled the first set of source files into my Xcode project. It will be great when there is a library (.a).
OK, the first part compiled and linked. I haven't pulled in zlib, libjpeg or libpng at this point because I'm not sure I will need them (I have my own libs for reading graphics files). Thanks for the pointer to the Mac project.

Now on to tutorials!

Posted: Fri Feb 27, 2009 1:14 am
by tracerx
Its working. I just need to figure out how to rotate the camera for landscape, and turn off my old rendering so I can get an accurate FPS reading.

Update: No joy on landscape yet.
Terrain (Example 12) is currently running at 12-13fps so I'm doing something very wrong or I need to turn something off. I'm not moving the camera or anything yet, just letting it sit there.

Another update: Getting 18-23fps in release mode. Closer.

OK turned off GUIEnvironment (which wasn't working for some reason). Now getting 28-30fps!

Losing Touches in my UIView

Posted: Sun Mar 01, 2009 6:10 am
by tracerx
After I spinup Irrlicht, I no longer get touch messages in my UIView. Is there a fix for this?

thx

edit: Oops, I see the engine has its own view, I'll have to redirect touches from that.

You can create a static library for Irrlicht on iPhone

Posted: Sat Mar 07, 2009 9:41 am
by Adversus
That's what I do and it works fine.

Although it would be nice to see the source files in the static libs in the project file.

Like you can for a MS Visual Studio solution.

Posted: Sat Mar 07, 2009 10:45 am
by hybrid
Ehh? What would that mean?