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.
Render loop or only when needed on mobile devices?
-
- Goblin
- Posts: 262
- Joined: Fri Nov 18, 2011 6:50 pm
- x 3
Render loop or only when needed on mobile devices?
Looking to find experienced Ogre & shader developers/artists. PM me with a contact email address if interested.
-
- Gnoblar
- Posts: 17
- Joined: Wed Apr 27, 2011 9:43 pm
Re: Render loop or only when needed on mobile devices?
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.
-
- Beholder
- Posts: 1512
- Joined: Fri Feb 22, 2013 4:44 am
- Location: Deep behind enemy lines
- x 139
Re: Render loop or only when needed on mobile devices?
Not less memory, but certainly less CPU/GPU and thus less battery. Implementing something like is ultimately all about the battery.