I am trying render a simple animation (object movement animation) on iPhone. I used OpenGL for object rendering. Movements appear to be smooth on the simulator. But if I use the same code on the iPod, the object movement is slower. In the iPhone, it is still slower.
I googled a bit and found 'frame rate independent rendering method', which taught me the concept of 'time interval' and object movement based on it. However, the result is very unpleasant. There is a lot of jerk in the animation even when the FPS remains above 20.
The following code fragment is used for calculation of the time interval between successive frames and I am using that to move my animation.
NSTimeInterval GetTimeIntervals(NSTimeInterval * inLastElapsedTime )
NSTimeInterval intervalTime = 0;
NSTimeInterval currentTime = [NSDate timeIntervalSinceReferenceDate];
if(*inLastElapsedTime != 0 )
intervalTime = currentTime - *inLastElapsedTime;
*inLastElapsedTime = currentTime;