Archived

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

JoJoSim1

DirectX & threads

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
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