Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I see that you've already come to a solution, but I thought it'd be good to throw in my own recent experiences for anyone else who comes onto this question...</p> <p>Yes, you can drive any number of adapters and outputs from a single process. Here's some information that might be helpful:</p> <p>In DXGI and DX11:</p> <p>Each graphics card is an "Adapter". Each monitor is an "Output". See <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb205075%28v=vs.85%29.aspx#Enumeration" rel="nofollow noreferrer">here</a> for more information about enumerating through these.</p> <p>Once you have pointers to the adapters that you want to use, create a device (ID3D11Device) using <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ff476082%28v=vs.85%29.aspx" rel="nofollow noreferrer">D3D11CreateDevice</a> for each of the adapters. Maybe you want a different thread for interacting with each of your devices. This thread may have a specific processor affinity if that helps speed things up for you.</p> <p>Once each adapter has its own device, create a <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb174537%28v=vs.85%29.aspx" rel="nofollow noreferrer">swap chain</a> and <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ff476517%28v=vs.85%29.aspx" rel="nofollow noreferrer">render target</a> for each output. You can also <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ff476507%28v=vs.85%29.aspx" rel="nofollow noreferrer">create your depth stencil view</a> for each output as well while you're at it.</p> <p>The process of creating a swap chain will require your windows to be set up: one window per output. I don't think there is much benefit in driving your rendering <em>from</em> the window that contains the swap chain. You can just create the windows as hosts for your swap chain and then forget about them entirely afterwards.</p> <p>For rendering, you will need to iterate through each Output of each Device. For each output change the render target of the device to the render target that you created for the current output using <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ff476464%28v=vs.85%29.aspx" rel="nofollow noreferrer">OMSetRenderTargets</a>. Again, you can be running each device on a different thread if you'd like, so each thread/device pair will have its own iteration through outputs for rendering.</p> <p>Here are a bunch of links that might be of help when going through this process:</p> <p><a href="https://stackoverflow.com/questions/10744788/display-different-images-per-monitor-directx-10?answertab=active#tab-top">Display Different images per monitor directX 10</a></p> <p><a href="https://stackoverflow.com/questions/15423021/dxgi-and-2-full-screen-displays-on-windows-7/15452007#15452007">DXGI and 2+ full screen displays on Windows 7</a></p> <p><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ee417025%28v=vs.85%29.aspx#multiple_monitors" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/windows/desktop/ee417025%28v=vs.85%29.aspx#multiple_monitors</a></p> <p>Good luck!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload