简体   繁体   English

使用DXGI将一台显示器切换到全屏模式时,其他显示器变黑

[英]Other monitors go black when switch one monitor to fullscreen with DXGI

When I switch one of my monitor to fullscreen mode, sometimes the other monitors just become black and won't show anything. 当我将其中一台显示器切换为全屏模式时,有时其他显示器只是变黑,什么也不显示。 Did I do something wrong or it is just some bug? 我做错了什么还是仅仅是个错误?

I created a window, and then created a swapchain binded to that window. 我创建了一个窗口,然后创建了绑定到该窗口的交换链。 And I called the swapchain's SetFullScreenState with first parameter true, and second parameter the IDXGIOutput object of the monitor I wanted to switch fullscreen. 我用第一个参数为true调用交换链的SetFullScreenState,第二个参数为我想切换全屏的监视器的IDXGIOutput对象。 Sometimes it works fine, but sometimes all the other monitors are lost (with only the fullscreened one showing things). 有时工作正常,但有时其他所有监视器都丢失了(只有全屏显示)。

My graphics card is Radeon HD6750, and driver version is 12.3. 我的显卡是Radeon HD6750,驱动程序版本是12.3。


I found the MulitMon10 sample has the same problem, while some games don't. 我发现MulitMon10示例存在相同的问题,而有些游戏则没有。 Or do Skyrim and The Tales of Monkey Island use D3D or OpenGL...? 还是《天际》和《猴岛传说》使用D3D或OpenGL ...?

This question is two years old. 这个问题已经两年了。 I just came across it. 我刚碰到它。 I had a similar issue with DX11, sometimes happening in debug version, systematicaly in release version. DX11也有类似的问题,有时会发生在调试版本中,有系统地出现在发行版本中。 In my paradigm, the primary monitor hosts a console and an optional 'press buttons' GUI. 在我的范例中,主监视器包含一个控制台和一个可选的“按下按钮” GUI。 The secondary monitor (one among available ones) is the fullscreen application window where 2D professional images are displayed and GPU transformed using 1D and 3D lookup tables. 辅助监视器(可用监视器中的一个)是全屏应用程序窗口,其中显示2D专业图像并使用1D和3D查找表对GPU进行转换。

Having the primary monitor going blank was a show stopper. 使主监视器变为空白是一个节目停止器。 All needed dialogs are childs of the console window (thus, opening on the primary monitor). 所有需要的对话框都是控制台窗口的子级(因此,在主监视器上打开)。 The secondary monitor is a motion picture digital projector .... enough 'blabla'. 辅助监视器是一台电影数字投影仪....足够“ blabla”。

So, my solution was to create the swapchain in windowed mode while the targeted window was already in fullscreen mode. 因此,我的解决方案是在目标窗口已经处于全屏模式的同时以窗口模式创建交换链。

Do not ask me why. 别问我为什么。 It works for me. 这个对我有用。 Here is a bit more: 这里还有更多:

First, my display window is set to fill the entire monitor surface ( no border, no everything). 首先,我的显示窗口被设置为充满整个监视器表面(没有边框,没有任何东西)。

Second, I create the swapchain for this window with “windowed = true”. 其次,我使用“ windowed = true”为此窗口创建交换链。

In facts, even if it looks fullscreen, it is windowed. 实际上,即使它看起来是全屏的,它也是有窗口的。 With no border, it works the same as far as displaying/rendering 2D images is concerned. 没有边框,就显示/渲染2D图像而言,其作用相同。 Feeding directly the backbuffer works too. 直接馈入后缓冲也可以。

Then, and only then, you can switch the backbuffer to real administrative fullscreen. 然后,只有那时,您才能将后缓冲切换为真正的全屏管理。 Since this operation is extremely brutal for the eyes, I tend to only do it when absolutely necessary. 由于此操作对眼睛极为残酷,因此我倾向于仅在绝对必要时才执行此操作。 In effects, Win7 will reset the entire desktop (thus, all monitors, all windows) and create multiple light flashes. 实际上,Win7将重置整个桌面(因此,所有监视器,所有窗口)并创建多个闪光灯。

When going real fullscreen after the backbuffer is created, I never experienced the desagrement of being stuck in the midle of a desktop reset (back to the original question). 在创建后缓冲后进入全屏显示时,我从来没有经历过被卡在桌面重置过程中的失望(回到原始问题)。

To be complete, there is a difference between 'Windowed fullscreen' and 'Real fullscreen'. 为完整起见,“窗口式全屏”和“真实全屏”之间是有区别的。 Something you may use. 您可能会用到的东西。

  • Windowed fullscreen: other windows/dialogs will overlap your 2D creation. 全屏窗口化:其他窗口/对话框将与您的2D创建重叠。

  • Real fullscreen: other windows/dialog should stay underneath (not visible, but there). 真正的全屏:其他窗口/对话框应留在下面(不可见,但在那里)。

Toggling between the two modes upon need would be nice, except the desktop reset stress is an heavy penalty to live with. 在需要时在两种模式之间切换会很好,除了桌面重置压力是不小的负担。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 DXGI显示器枚举未提供Dell P2715Q显示器的完整尺寸 - DXGI monitors enumeration does not give full size for Dell P2715Q monitor 插入新监视器时 NSScreen 不更新监视器计数 - NSScreen not updating monitor count when new monitors are plugged in 当监视器B将窗口移动到监视器上时,双监视器设置中的监视器A上的全屏模式会中断 - Fullscreen mode on monitor A in dual-monitor setup breaks when moving windows from monitor B onto it QT 4.8中的几台显示器全屏应用 - Several monitors fullscreen application in QT 4.8 GLFW get Monitors count = 0,附加了另外两个监视器 - GLFW get Monitors count = 0, two other monitors are attached OpenGL 着色器程序在使用时导致屏幕变黑 - OpenGL Shader Program causing screen to go black when used 使用twinview Ubuntu 12.04 C ++在2台显示器上的全屏应用程序 - Fullscreen application on 2 monitors using twinview Ubuntu 12.04 c++ 使用WinApi的C ++中的多监视器屏幕截图仅2个监视器 - Multi-monitor Screenshots only 2 monitors in C++ with WinApi 使用SFML在第二台显示器上打开全屏窗口? - Open a fullscreen window on 2nd monitor with SFML? DXGI 桌面复制 API 何时将区域识别为移动区域? - When does DXGI Desktop Duplication API identify a region as a moved region?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM