(Ogre 1.8.x, recent revision)
This might be a dumb question, but I can't figure out the point of the renderOneFrame() function which take the time since last frame:
/** Render one frame, with custom frame time information.
@remarks
Updates all the render targets automatically and then returns,
raising frame events before and after - all per-frame times are based on
the time value you pass in.
*/
bool renderOneFrame(Real timeSinceLastFrame);
This suggests that it is useful only if you use frame events? The use cases are not clear to me.
This is used internally for things like particle systems. Unlike animations where you have to manually add time to make them animate, particle systems run on their own. If you want your game world to change speed (slow down, speed up or pause) you pass in different delta times to renderOneFrame and it uses those instead of it's own calculated time. Anything else that uses frame listeners but you want to speed up or slow down (hydrax wave animation, possibly ribbon trail fading, etc) can be affected by it too.
Kojack wrote:This is used internally for things like particle systems. Unlike animations where you have to manually add time to make them animate, particle systems run on their own. If you want your game world to change speed (slow down, speed up or pause) you pass in different delta times to renderOneFrame and it uses those instead of it's own calculated time. Anything else that uses frame listeners but you want to speed up or slow down (hydrax wave animation, possibly ribbon trail fading, etc) can be affected by it too.
Ok, thank you very much because this seems damn important for my context! I didn't know the particle system was dependant on that. That would explain a lot.
This function comments should be enhanced. I'll make a little patch.