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

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
jaber
Posts: 3
Joined: Fri Feb 20, 2009 10:52 pm

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

Post 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?)

:?
grafikrobot
Posts: 44
Joined: Wed Dec 26, 2007 11:42 pm

Post 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.
jaber
Posts: 3
Joined: Fri Feb 20, 2009 10:52 pm

Post 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.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
tracerx
Posts: 19
Joined: Thu Feb 26, 2009 6:36 am

Post 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!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
tracerx
Posts: 19
Joined: Thu Feb 26, 2009 6:36 am

Post 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.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
tracerx
Posts: 19
Joined: Thu Feb 26, 2009 6:36 am

Post 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).
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
tracerx
Posts: 19
Joined: Thu Feb 26, 2009 6:36 am

Post 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!
tracerx
Posts: 19
Joined: Thu Feb 26, 2009 6:36 am

Post 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!
tracerx
Posts: 19
Joined: Thu Feb 26, 2009 6:36 am

Losing Touches in my UIView

Post 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.
Adversus
Posts: 128
Joined: Sun Oct 05, 2008 10:58 pm
Contact:

You can create a static library for Irrlicht on iPhone

Post 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.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Ehh? What would that mean?
Post Reply