Created
November 28, 2012 13:43
-
-
Save tuttlem/4161383 to your computer and use it in GitHub Desktop.
DoubleBuffer - MessagePump
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StillRunning: | |
; check if there are messages on the queue to process | |
invoke PeekMessage, ADDR msg, NULL, 0, 0, PM_REMOVE | |
; if not, get on with rendering | |
cmp eax, 0 | |
je RenderFrame | |
; dispatch the message as needed | |
invoke DispatchMessage, ADDR msg | |
RenderFrame: | |
; --- do some drawing here --- | |
; tell windows that the client area for this window is no | |
; longer valid and needs to be re-drawn | |
invoke InvalidateRect, hWnd, NULL, 0 | |
cmp bRunning, 1 | |
je StillRunning |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment