我最近读了一篇article前面提到的DirectX 12独有的全屏窗口本质上是无边框全屏窗口,受DWM的控制。鉴于 DWM 根据显示设置中选择的刷新率运行,这是否意味着无法在 DirectX 12 中使用与显示设置不同的刷新率配置交换链?
检查后DirectX12 sample来自微软,我注意到他们没有指定全屏转换的刷新率。这让我假设全屏窗口使用 DWM 的刷新率。有人可以验证一下吗?
最佳答案
Given that DWM operates based on the refresh rate chosen in the display settings, does this mean it's not possible to configure a swapchain in DirectX 12 with a different refresh rate from the display setting?
否,DWM 将以 DXGI_SWAP_CHAIN_FULLSCREEN_DESC 指定的刷新率运行传递至CreateSwapChainForHwnd
After examining this DirectX12 sample from microsoft
该示例未使用全屏独占/优化。它只是无边框窗口(将使用 DWM 刷新率)。
您可以通过传递有效指针而不是 nullptr here 来使其成为 FSE。在桌面示例中。
编辑:实际上,如果m_tearingSupport
为假,那么它将使用FSE(即FSE=SetFullscreenState
,Borderless Windowed=SetWindowPos
),刷新率可能就是您所说的 DWM 的刷新率。这取决于它采取哪条路径 here .
对于 UWP,我不知道 ApplicationView::TryEnterFullScreenMode
是否执行 FSE,并且无论如何也看不到配置刷新率。
关于windows - DirectX 12 "Full Screen Exclusive Windows"是否强制以与 DWM 相同的刷新率运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/77119334/