Original Post
I'm working on a multithreaded game engine where the game update loop would be running on the main thread (at fixed 60 fps) and rendering in another thread (as fast as possible). The problem I now faced was that I was creating the game window in the main thread, and apparently DirectX 10 can't handle windows not created by the calling thread. So obviously I have to move all my window handling into the rendering thread. My keyboard and mouse input is handled using WM_INPUT window messages, so I can't think of anything else but to move my input systems also to the rendering thread. But this would make my input handling dependent on the rendering framerate. How can I separate the input handling from the rendering thread, so that the input handling could be updated in sync with the game update (at 60 fps) independent of the rendering thread's framerate? One thing also came to my mind: is it possible to only create the window in the rendering thread (keeping DX10 happy) and then have the message pump in the main thread (I really doubt this)?