quote:Original post by XaiTake a look at his loop structure. GameLoop() gets called when there are no messages in the message queue. Which, I presume, would not be an ideal time to sleep.
...but you KNOW you do not need it when you have no messages in the message queue...
The truth is that we have terrible notions of the main game loop, and particularly of handling the Windows message pump. Introductory texts set up a basic loop/pump based on the notion that the game updates single step (as opposed to interpolating multiple step), resulting in these debates.