Basic GameLoop Issues using Windows Messaging ...

Started by
10 comments, last by Oluseyi 19 years, 2 months ago
You know how every programmer has those REALLY bad days where they tear their hair out and say naughty words? Well, I'm having the opposite :-) (Wich deserves me a coffee :-))

Update() is the function where you do all the drawing with OGL ?

So, if your app has windows messages to process in the queue then it does them, otherwise it draws the next frame and repeats. I see clear now :)

Thanks a lot dude.
__________Michael Dawson"IRC is just multiplayer notepad." - Reverend
Advertisement
Quote:Original post by mumpo
...but it is not entirely true that the loop condition is never false -- GetMessage() returns false when the quit message is posted. Thus, used correctly GetMessage() ensures that your program stays in the message loop as long as the main program is running. Then, when you exit, it exits the loop to allow any clean up code after the loop to run.
Actually, to be pedantic, GetMessage is a tri-value API. It returns 0 when the message queue is to be terminated, but it returns values greater than zero for valid messages and values less than zero for errors. Most code ignores the fact that GetMessage returns error codes.

This topic is closed to new replies.

Advertisement