loopguru
10-30-2002, 11:08 AM
I have a really simple need for threads in my application (WIN32):
Open a window from the main application -> Render a scene in that window.
I'd like to support multiple windows. Unfortunately, I see no simple way of doing this without using a separate thread per window - particularly being that each thread can have at most ONE rendering context. Has anybody out there done this before? I'm really pressed for time so some good, detailed info - or better yet source code - would really help.
Also, I've read "when using multiple threads the modified message pump (using PeekMessage) should be replaced with the usual GetMessage/TranslateMessage combination." Could someone explain this? We're talking about the message pump in the main application ( or associated with the spawned window ), right?
Thanks for the help.
Cheers!
ks
Open a window from the main application -> Render a scene in that window.
I'd like to support multiple windows. Unfortunately, I see no simple way of doing this without using a separate thread per window - particularly being that each thread can have at most ONE rendering context. Has anybody out there done this before? I'm really pressed for time so some good, detailed info - or better yet source code - would really help.
Also, I've read "when using multiple threads the modified message pump (using PeekMessage) should be replaced with the usual GetMessage/TranslateMessage combination." Could someone explain this? We're talking about the message pump in the main application ( or associated with the spawned window ), right?
Thanks for the help.
Cheers!
ks