|
|
- Just ignore WM_PAINT and WM_ERASEBKGND, that should do the trick. - They don't interact. When you switch to a new context, the previous context is automatically flushed, which means all queued operations are begun (but not necessarily finished.) glFinish blocks until all queued operations are finished. - A context can only be current in one thread at a time. Since you have a drawing thread that has the context all the time, and a window thread that doesn't need to bother with the context at all, this shouldn't be an issue.
An aside: window-thread and render-thread seems like a very difficult way to set things up. Do you absolutely need to have the rendering code in a separate thread for your performance-testing purposes? If not, it will be much easier to keep them in the same thread and use a messagepump of the form: while (true) { process any queued messages; render frame; }.
|