Compiling irrlicht ogl-es branch for iphone (progress)

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!
digijohnny
Posts: 63
Joined: Sat Sep 12, 2009 6:08 pm
Contact:

Re: Compiling irrlicht ogl-es branch for iphone (progress)

Post by digijohnny »

Thanks Guys, Great Work!!
v4509 OGLES1 & OGLES2 running on iOS6.x
and ( following hybird's patch http://pastebin.com/arTJ2Ug3 )
it's running on my Raspberry Pi as well!!!!
pak
Posts: 4
Joined: Mon Apr 22, 2013 8:18 pm

Re: Compiling irrlicht ogl-es branch for iphone (progress)

Post by pak »

So, how do I compile Irrlicht for iOS? There is an Xcode project under source/Irrlicht/iOS and it compiles the library just fine, but how to compile the examples? And how do I create a new Irrlicth project?

The IrrlichtTemplate linked earlier in this thread is from 2010, isn't there a newer one?
penguin03
Posts: 25
Joined: Fri Apr 19, 2013 9:52 am

Re: Compiling irrlicht ogl-es branch for iphone (progress)

Post by penguin03 »

I just compile the r4512 for ios6, the OGLES1 is ok. But the OGL2 can't run, even the beginScene can't clear the background.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Compiling irrlicht ogl-es branch for iphone (progress)

Post by Nadro »

Did you include shaders files into your project? If you can please show console logs.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
pak
Posts: 4
Joined: Mon Apr 22, 2013 8:18 pm

Re: Compiling irrlicht ogl-es branch for iphone (progress)

Post by pak »

The problem is, there are no Xcode projects or templates to compile any of the examples. I managed to do Xcode projects that compile some of the samples, they even run but nothing appears on the screen, except the standard status bar. Messages on the console indicate that e.g. sydney.md2 have been loaded and all that stuff but they just can't be seen on the screen.

The only thing that works is ExampleApplication.zip that I downloaded from I don't remember where. There are main.mm, Application.mm and all that in that sample. The newer "This is the main method. We can now use main() on every platform" doesn't seem to work. It does run the main() but the gl display disappears somewhere.

And I was using video::EDT_OGLES1 cause I thought ES2 doesn't work yet.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Compiling irrlicht ogl-es branch for iphone (progress)

Post by Nadro »

You can't use just "main()" under iOS, but it's not our fault. iOS API require some changes in game structure and these changes are available eg. in ExampleApplication.zip. Maybe at this week I'll prepare official example for iOS (+ maybe Android) and I'll add them to the branch.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
penguin03
Posts: 25
Joined: Fri Apr 19, 2013 9:52 am

Re: Compiling irrlicht ogl-es branch for iphone (progress)

Post by penguin03 »

The EMT_TRANSPARENT_ALPHA_CHANNEL mesh is not corrected rendered by ogles2.0 for iphone. I created a quad mesh with an alpha texture, the render output is a black quad. It's rendered correctly by ogles1 device. I use the lastest revision 4512.
pak
Posts: 4
Joined: Mon Apr 22, 2013 8:18 pm

Re: Compiling irrlicht ogl-es branch for iphone (progress)

Post by pak »

Nadro wrote:You can't use just "main()" under iOS, but it's not our fault. iOS API require some changes in game structure and these changes are available eg. in ExampleApplication.zip.
So the ExampleApplication.zip is the current way for iOS projects. Ok.

Even ES2 seems to work. The trick is to add the shaders from media/Shaders to your Xcode project, AND in the "Build phases" page, move them from "Compile sources" to "Copy Bundle resources". And if your project has its own shaders, do the same for them also.

There are some minor issues though. When running it complains "Application windows are expected to have a root view controller at the end of application launch". And the FPS camera doesn't work.
Maybe at this week I'll prepare official example for iOS (+ maybe Android) and I'll add them to the branch.
That would be great. Highly appreciated !
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Compiling irrlicht ogl-es branch for iphone (progress)

Post by Nadro »

@penguin03
Thanks for info. I'll check EMT_TRANSPARENT_ALPHA_CHANNEL.

@pak
"Application windows are expected to have a root view controller at the end of application launch"

If you will assign your ViewController to "UIWindow::rootViewController" before Irrlicht createDevice method, this warning will dissappear.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
pak
Posts: 4
Joined: Mon Apr 22, 2013 8:18 pm

Re: Compiling irrlicht ogl-es branch for iphone (progress)

Post by pak »

Nadro wrote:If you will assign your ViewController to "UIWindow::rootViewController" before Irrlicht createDevice method, this warning will dissappear.
And where can I find that ViewController? I thought that CIrrDeviceiOS would create one, but it seems that it does not. I should probably make a ViewController. Now I'm little lost, because usually the ViewController creates the GLView, doesn't it?
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Compiling irrlicht ogl-es branch for iphone (progress)

Post by Nadro »

You can create your own ViewController, but there isn't required for properly working application (anyway without ViewController you will see warning). If you don't provide ViewController, Irrlicht assign UIView directly to UIWindow instead of ViewController.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Compiling irrlicht ogl-es branch for iphone (progress)

Post by Nadro »

Today I added iOS example to ogl-es branch. If you want, you can check it.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
penguin03
Posts: 25
Joined: Fri Apr 19, 2013 9:52 am

Re: Compiling irrlicht ogl-es branch for iphone (progress)

Post by penguin03 »

@Nadro
no IOS example in ogl-es branch. I checked it, still revision 4513
zerochen
Posts: 273
Joined: Wed Jan 07, 2009 1:17 am
Location: Germany

Re: Compiling irrlicht ogl-es branch for iphone (progress)

Post by zerochen »

i guess you have still the old svn link.
look here for further information:
http://irrlicht.sourceforge.net/forum/v ... =2&t=48568
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Compiling irrlicht ogl-es branch for iphone (progress)

Post by hybrid »

Yeah, we're at 4516 now.
Post Reply