Render loop or only when needed on mobile devices?

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
Post Reply

Do you skip rendering on frames nothing has happened?

Yes
0
No votes
No - it's too much work
0
No votes
No - I don't care about this issue
1
20%
I would, except things change virtually every single frame anyway
4
80%
 
Total votes: 5

simedj
Goblin
Posts: 262
Joined: Fri Nov 18, 2011 6:50 pm

Render loop or only when needed on mobile devices?

Post by simedj » Wed Jan 22, 2014 6:06 pm

My project is not a game but uses the traditional render loop - on Windows it runs as fast as it can and on iOS it is triggered by some iOS timer (at 60Hz IIRC). But it got me thinking, on mobile devices should we be responsible and only render when something has actually changed, rather than blindly rendering every frame regardless? I would assume rendering a 3D scene is about the hardest the device ever has to work and thus drains the battery faster than normal.

Often, things are changing every frame but not always - maybe when you are at a menu screen or pause the game. Or in some game types there may be no "moving parts" between turns - imagine a 3D chess game where the pieces animate their moves.

Is it a big deal and do people make any effort to avoid wasting CPU cycles? I put this in mobile because on a regular PC, I doubt many developers are that concerned about the environment.
0 x
Looking to find experienced Ogre & shader developers/artists. PM me with a contact email address if interested.

User avatar
Argosse
Gnoblar
Posts: 17
Joined: Wed Apr 27, 2011 9:43 pm

Re: Render loop or only when needed on mobile devices?

Post by Argosse » Wed Jan 29, 2014 8:48 am

I think you're completely right about only rendering when needed as long as like you said no changes have occured. Would the app use less memory if only rendering when needed? I think I may try applying this to my app during menus and pausing, besides input. Maybe a if(needRendering){mRoot->renderoneframe()}; and functions can change that variable.
0 x

User avatar
c6burns
Beholder
Posts: 1511
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines

Re: Render loop or only when needed on mobile devices?

Post by c6burns » Wed Jan 29, 2014 8:55 am

Not less memory, but certainly less CPU/GPU and thus less battery. Implementing something like is ultimately all about the battery.
0 x

Post Reply