w_reade
2002.09.09, 09:12 PM
that's RunApplicationEventLoop(), btw.
So, is it a good idea?
that is: as far as I can tell, you call RAEL() and it calls other functions depending on (1) events and (2) timers.
If I simply had a timer which called a function DoFrame() thirty times (say) every second, what sort of a speed penalty would there be, compared to a function like the following?
void MainLoop(void)
{
while (!done)
{
GetTime();
DoFrame();
WaitNextEvent();
HandleEvent();
TwiddleThumbsUntilTimeForNextFrame();
}
}
Or is RAEL() absolutely fine for games? I can see plenty of convenience advantages to it, but I have no idea about speed. If anyone knows, do let me know. Cheers!
So, is it a good idea?
that is: as far as I can tell, you call RAEL() and it calls other functions depending on (1) events and (2) timers.
If I simply had a timer which called a function DoFrame() thirty times (say) every second, what sort of a speed penalty would there be, compared to a function like the following?
void MainLoop(void)
{
while (!done)
{
GetTime();
DoFrame();
WaitNextEvent();
HandleEvent();
TwiddleThumbsUntilTimeForNextFrame();
}
}
Or is RAEL() absolutely fine for games? I can see plenty of convenience advantages to it, but I have no idea about speed. If anyone knows, do let me know. Cheers!