Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

JoJoSim1

DirectX & threads

This topic is 5678 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

Hi is it possible to have one thread that creates the app with the window handle etc. and then start a second thread which renders in this window ? when you create the second thread you give LPDIRECT3DDEVICE8 as parameter ?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Sure, it is exactly that I do.

Share this post


Link to post
Share on other sites
Yes, but there are a couple of additional rules you should follow. When you initialize COM, use CointializeEx, and pass it the COINIT_MULTITHREADED flag. You are suppose to do this on each thread. Also, I think you are supposed to create and destroy the D3D object from the message pump thread.

If you run in debug mode with the debug spam on, it''ll complain about minors things you are doing wrong.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!