Reputation: 4190
The code was:
open_window();
for(i=0;i<100000;i++){
clear_the_window();
draw_frame(i);
wait_until_a_24th_of_a_second_is_over();
}
The book says the problem with this code is: Suppose the drawing takes nearly a full 1/24 second. Items drawn first are visible for the full 1/24 second and present a solid image on the screen; items drawn toward the end are instantly cleared as the program starts on the next frame.
I don't quite understand what does it mean by "first" and "toward the end"? If the three functions within the loop are called sequentially, what is the problem? Unless it is not a sequential program?
Upvotes: 1
Views: 119
Reputation: 47241
Say this span of 10 stps covers 1/24th of a second:
------- NEXT iteration -------
Upvotes: 2