IOS stops rendering

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
aoikonom
Gnoblar
Posts: 23
Joined: Tue Aug 07, 2012 11:05 am

IOS stops rendering

Post by aoikonom »

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?
aoikonom
Gnoblar
Posts: 23
Joined: Tue Aug 07, 2012 11:05 am

Re: IOS stops rendering

Post by aoikonom »

If seems that when Root::startRendering ends and a new one starts it looses drawing context for some reason?
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: IOS stops rendering

Post by masterfalcon »

startRendering cannot be used on iOS. You must render by calling renderOneFrame using either a NSTimer or CADisplayLink.
aoikonom
Gnoblar
Posts: 23
Joined: Tue Aug 07, 2012 11:05 am

Re: IOS stops rendering

Post by aoikonom »

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.
aoikonom
Gnoblar
Posts: 23
Joined: Tue Aug 07, 2012 11:05 am

Re: IOS stops rendering

Post by aoikonom »

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?
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: IOS stops rendering

Post by masterfalcon »

Yes, that is so that the Ogre views receive events from the OS.
supadenz
Halfling
Posts: 41
Joined: Sat Feb 16, 2013 2:18 am
x 1

Re: IOS stops rendering

Post by supadenz »

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?
I have the same problem. It's very frustrating.
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: IOS stops rendering

Post by masterfalcon »

I'm not exactly sure what you two mean by this or why you're destroying everything and recreating them.
Post Reply