Archived

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

Brobanx

Performance of DirectX 8.1 in a multithreaded environment.

Recommended Posts

I read in the docs that when creating the Direct3D device, you can specify to make it multithread safe, but that this "decreases performance because it checks it global critical section more often." I''m wondering exactly what they mean by "multithread safe". For example, let''s say I''m locking and filling a vertex buffer with new polys, and from another thread I say to draw from that vertex buffer... with the multithread safe option on, am I to assume this would not cause any (game-crashing) conflicts???? Also I was dissecting the code that MS uses when you make a "direct X application" from the project menu (MSVC++ specific here), and rather than threads, they use a set of booleans to check the current state, and only render when there''s no messages being sent to the window. I''m wondering if this should be the example to follow... I could either set up a set of booleans, that say to update the world geometry, then draw it, or use seperate threads for both those tasks. I''m wondering which would perform better, and if it''s safe to be accessing the same vertex buffer from different threads.

Share this post


Link to post
Share on other sites