Page 9 of 10

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

Posted: Wed Apr 17, 2013 11:22 pm
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!!!!

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

Posted: Wed Apr 24, 2013 8:33 am
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?

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

Posted: Thu Apr 25, 2013 2:06 am
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.

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

Posted: Thu Apr 25, 2013 10:18 am
by Nadro
Did you include shaders files into your project? If you can please show console logs.

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

Posted: Thu Apr 25, 2013 4:28 pm
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.

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

Posted: Thu Apr 25, 2013 9:24 pm
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.

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

Posted: Fri Apr 26, 2013 6:29 am
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.

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

Posted: Fri Apr 26, 2013 7:40 am
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 !

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

Posted: Fri Apr 26, 2013 11:11 am
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.

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

Posted: Fri Apr 26, 2013 6:50 pm
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?

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

Posted: Fri Apr 26, 2013 7:02 pm
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.

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

Posted: Wed May 01, 2013 5:10 pm
by Nadro
Today I added iOS example to ogl-es branch. If you want, you can check it.

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

Posted: Fri May 03, 2013 11:15 am
by penguin03
@Nadro
no IOS example in ogl-es branch. I checked it, still revision 4513

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

Posted: Fri May 03, 2013 12:46 pm
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

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

Posted: Fri May 03, 2013 12:51 pm
by hybrid
Yeah, we're at 4516 now.