NmdMystery
NmdMystery

Reputation: 2888

DirectX immediate context on different thread from message pump

If I call CoInitializeEx() with the flag COINIT_APARTMENT_THREADED, is it wise to create and use all my Direct3D objects on a different thread than the one that calls PeekMessage() or GetMessage()? Does this have a performance hit?

Upvotes: 1

Views: 337

Answers (1)

Chuck Walbourn
Chuck Walbourn

Reputation: 41127

In general, you should make sure your main windows thread pump, DXGI calls, and immediate context usage are all on the same thread. See "DirectX Graphics Infrastructure (DXGI): Best Practices".

Upvotes: 1

Related Questions