# How do I use threads together with DirectX11?

I have only found the documents on MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476884(v=vs.85).aspx Although it doesn't say anything about creating them, it mentions that device is thread-safe while device context is not.

Does the framework use threads by itself (if driver supports it) when it thinks it's more optimal? Or do we have to use some external library like BOOST to play around with threads?

You have to create the threads yourself, using your threading library of choice (boost, C++11 async, Windows threads, etc). The idea is that you will create several threads and split up your CPU rendering work amongst them. Each thread uses a D3D11 deferred context to accumulate all the D3D11 commands (state changes, draw calls, etc.) it wants to execute. Later, in your main thread, you'll use the immediate context to call each deferred context, to send those command buffers to the GPU to be rendered. The main thread should also do the Present() call to display the final frame on-screen.