问题
I am developing a program that needs two full screen Direct3D dispalys. According to the documentation I should create the swap chains in windowed mode and then switch to full screen mode. While this works fine on Windows 8 (currently I'm just using Alt-Enter to do the switch), it does not work on Windows 7. On Windows 7 I get a problem similar to this issue where the screen that has most recently been switched to full screen works fine, but the other screen, which was previously working just fine in full screen, goes black (and stays at the same full screen resolution) until I take it out of full screen.
You can find my mess of a rough prototype at this tag.
Apparently there have been other bugs relating specifically to Windows 7 in the past... But I appear to be getting an issue that is slightly different.
Also, I have tried disabling DWM Composition like suggested in the linked question, but that did not do anything to resolve the problem..
Please let me know if there's any more information I can provide about the issue... I guess worst case scenario is I simply fall back on DX9 which apparently works fine for multi-monitor full screen setup...
回答1:
I think I may have figured out the cause of the problem: It may be because I was creating multiple ID3D11Device for the same Adapter.
My code was overly complex for what I needed as I was following techniques introduced in this article when I really didn't need anything more than a single thread for all windows and rendering. After sharing the same ID3D10Device for each Render Target (one Render Target per Output, one ID3D10Device per Adapter) I have successfully got DXGI with DX10 rendering two full screen displays as shown in my rough memory-leaking proof of concept.
Since this was my first time working with any of this tech, I used this article to help me along with this process: Display Different images per monitor directX 10
来源:https://stackoverflow.com/questions/15423021/dxgi-and-2-full-screen-displays-on-windows-7