Win32 Message Pump and OpenGL - rendering 'pauses' while dragging/resizing

Started by
15 comments, last by Evil Steve 16 years ago
It wasn't an argument and I'm not sure why you're turning this into one. I simply told you the standard method for overriding the default behavior of the windowing system. If you don't like the consequences of doing it in this particular situation, don't do it.
Advertisement
Sorry, I'm still a little on the edge after finding out all that stuff about Win32 code, and I jumped the gun when your post somewhat seemed to defend it like "there's nothing wrong with Win32 msg pump design, just do this and everything'll work the way you want it to."

Anyway, Windows is a reality we live in so I'll just have to face it. >.< I just kinda had better expectations for it before (I was never one of those guys who always dissed it).
In my opinion, your game engine loop shouldn't be tied to your rendering loop anyway. So sure, rendering stops when the window is being resized, but your game logic shouldn't. That is done by having the game logic in a separate thread.
Yeah, that's kinda what I'm considering at this point, however it's still not an ideal solution, as the input polling has to stay in the main thread. I'll have to think more about this.
FWIW, some of the details of what DefWindowProc will do under the hood are spelled out in the documentation for the messages themselves versus that function specifically. Additionally, DefWindowProc is (like some other aspects of the API) not spelled out in exact detail for a reason: you aren't supposed to care, so that the development team is free to make tweaks without breaking assumptions you may have made on implementation details.

After all, they have enough of those hacks in the OS to cover the asses of bad developers already.
Quote:Original post by jpetrie
After all, they have enough of those hacks in the OS to cover the asses of bad developers already.


Do you read Raymond Chen's blog as well?

Quote:Original post by shurcool
Yeah, that's kinda what I'm considering at this point, however it's still not an ideal solution, as the input polling has to stay in the main thread. I'll have to think more about this.
What sort of input polling? If you just record mouse movement, mouse button presses and keyboard presses, you can just record them in an array of volatile bools and ints. Access to them should be atomic, so there shouldn't be any problems accessing them from two threads.

This topic is closed to new replies.

Advertisement