Original Post
Hi, I'm currently writing a spring based hair system. I've got all of the physics and hair generation code sorted, however it is evident that the performance would be boosted if I multi threaded the physics update step. At the moment my hair objects all update in a primary update function and are passed to a vertex buffer to be rendered in the primary update function. My question is:(This question relates primarily to win32) Is it enough to lock a shared resource buffer with a Critical Section in Thread A(Assuming thread A is the application primary thread or the DirectX thread) when the worker thread (the physics thread) could be updating the same buffer with newly calculated data from the physics step? If not, I would appreciate it if someone could offer me a pointer to what I should do? Thanks in advance, matt
