Reputation: 41
I recently read an article that mentioned DirectX 12's exclusive fullscreen windows are essentially borderless fullscreen windows, which fall under the control of 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?
After examining this DirectX12 sample from microsoft, I've noticed they don't specify a refresh rate for fullscreen transitions. This makes me assume that fullscreen windows use DWM's refresh rate. Can someone verify this?
Upvotes: 2
Views: 1064
Reputation: 3435
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?
No, DWM will operate at the refresh rate specified by DXGI_SWAP_CHAIN_FULLSCREEN_DESC passed to CreateSwapChainForHwnd
After examining this DirectX12 sample from microsoft
That sample isn't using Fullscreen Exclusive/Optimizations. It's just borderless windowed (which will use the DWM refresh rate).
You can make it FSE by passing a valid pointer instead of nullptr here in the desktop sample.
Edit: Actually if m_tearingSupport
is false then it will use FSE (i.e. FSE=SetFullscreenState
, Borderless Windowed=SetWindowPos
), the refresh rate will probably just be that of the DWM as you said. It depends on which path it takes here.
For UWP, I have not idea whether ApplicationView::TryEnterFullScreenMode
does FSE or not, and cant see anyway to configure the refresh rate.
Upvotes: 3