   Threading on directx9
  What are the rules for threading in directx9?Am I allowed to create vertex buffers on one thread and make drawing calls on another thread at the same time or must all my directx calls be made from the same thread? (I'm assuming my code will handle synchonization so it won't attempt to use the same object on both threads at the same time...)If that isn't allowed is it possible to access the memory of locked vertex buffers on theads that are not the thread that locked them?Is this documented anywhere? I couldn't find any reference in the official documentation although I expect it's there somewhere.   
  IIRC, when you initialise DirectX, theres some kind of MULTITHREAD flag or something. If you specify that flag then it's safe to use your device from multiple threads, otherwise only the thread that created it can use it.Take note though that internally, DX provides this thread-safety by locking a critical section for every API call, which can add a lot of overhead.[EDIT] here's some linksD3DCREATE_MULTITHREADEDAvoiding D3DCREATE_MULTITHREADED in multithreaded enviroment;  Hmm I thought I'd posted this in the directx forum, sorry.Thanks for the links I'll take a look :)   ;  You need to use the D3DCREATE_MULTITHREADED flag if you intend to make more than one DX call at the same time. For example, trying to create a vertex buffer on one thread while making a render call on another thread will probably cause the CreateVertexBuffer call to fail with an "out of memory" error.The flag doesn't cause the hardware to become multithreaded. It just acquires the global critical section before each call. Meaning that separating calls across threads degrades performance rather than improving it. It also means you don't need the flag if you are handling your critical sections manually. You could for example, create a bunch of resources on one thread and then render them (afterwards) on a separate thread, without needing to use the flag.   