• Advertisement
Sign in to follow this  

Is it possible to put message pump into a separate thread?

This topic is 3555 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

A quickie question; Is it possible to put message pump into a separate thread? The usual method seems to be putting the message pump in main program and the game in threads, but in my prototype's case it would be convinient to do things the other way around. However, just moving message pump into a thread didn't seem to work, so is there some detail I should be aware of? Thanks for the help :D

Share this post


Link to post
Share on other sites
Advertisement
Message queues are per thread so you need to create the window in the same thread as you intend to do the pump. As long as you do that you should be fine.

Share this post


Link to post
Share on other sites
Also note that if you're using D3D, then all D3D access should be done from the thread that handles the window messages. If you absolutely must, then use the multithreaded flag, but some functions still need to be called from the message pump thread.

Then again, if you're not using D3D, never mind [smile]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement