flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Windows > OpenGL.asm example

Author
Thread Post new topic Reply to topic
WereMole



Joined: 28 May 2016
Posts: 3
OpenGL.asm example
What causes the WM_PAINT message to be repeated called in the OPELGL.ASM example?
Post 09 Oct 2016, 01:15
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 14923
Location: 6EQUJ5
Because the update region is never validated Windows will continue to send WM_PAINT messages.
Post 09 Oct 2016, 03:01
View user's profile Send private message Visit poster's website Reply with quote
WereMole



Joined: 28 May 2016
Posts: 3
Thank you. I did not understand the importance of the validation.

https://msdn.microsoft.com/en-us/library/windows/desktop/dd145213(v=vs.85).aspx

To verify this I modified the WIN64 > OPENGL example.

I added three lines. The code was:

proc WindowProc uses rbx rsi rdi, hwnd,wmsg,wparam,lparam
mov [hwnd],rcx
frame

now:

proc WindowProc uses rbx rsi rdi, hwnd,wmsg,wparam,lparam
mov [hwnd],rcx
mov [wmsg],rdx
mov [wparam],r8
mov [lparam],r9
frame

Then I changed the end of .wmpaint from:

jmp .finish

To:

mov rcx,[hwnd]
mov rdx,[wmsg]
mov r8,[lparam]
mov r9,[wparam]

jmp .defwndproc

The animation stopped.

Thanks again
Post 09 Oct 2016, 11:49
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.