I have created a game using OGRE that runs ok in Windows and Android. When trying to run it on an Ipad, it runs ok at first, showing graphics correctly, but when choosing level in the game, it stops rendering. It keeps showing the same screen while on the background it normally compiles all the shaders and the game logic continues. It reacts normally in touch as I can see from the log files. It even gives me normal stats (trigangles and fps), like it does render, but not on the screen. When choosing level it creates a destroys a resource group and loads another one and creates a new SceneManager.
What could go wrong?
IOS stops rendering
-
- Gnoblar
- Posts: 23
- Joined: Tue Aug 07, 2012 11:05 am
Re: IOS stops rendering
If seems that when Root::startRendering ends and a new one starts it looses drawing context for some reason?
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
Re: IOS stops rendering
startRendering cannot be used on iOS. You must render by calling renderOneFrame using either a NSTimer or CADisplayLink.
-
- Gnoblar
- Posts: 23
- Joined: Tue Aug 07, 2012 11:05 am
Re: IOS stops rendering
masterfalcon thanks for your answer. Could you please be more specific about that? Is it for managing OS events? Truth is that I use marmalade and a port of Ogre to Marmalade so I guess that would not be a problem. Forgot to mention Ogre version which is Ogre 1.8.
-
- Gnoblar
- Posts: 23
- Joined: Tue Aug 07, 2012 11:05 am
Re: IOS stops rendering
If instead of destroying scenemanager, viewports, camera and MyGUI and recreating them, I keep the same, rendering is done correctly. I guess I can solve it this way, but why is this happening?
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
Re: IOS stops rendering
Yes, that is so that the Ogre views receive events from the OS.
-
- Halfling
- Posts: 41
- Joined: Sat Feb 16, 2013 2:18 am
- x 1
Re: IOS stops rendering
I have the same problem. It's very frustrating.aoikonom wrote:If instead of destroying scenemanager, viewports, camera and MyGUI and recreating them, I keep the same, rendering is done correctly. I guess I can solve it this way, but why is this happening?
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
Re: IOS stops rendering
I'm not exactly sure what you two mean by this or why you're destroying everything and recreating them.