You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.
swapChain.ContainingOutput.GetClosestMatchingMode(device, modeDesc, out modeDesc);
swapChain.ResizeTarget(ref modeDesc);
When going to fullscreen mode, I make sure I use a ModeDescription that is supported by my monitor (in this case 60020/1000). The problem is though, that the ResizeTarget method does not change the refresh rate of the swapchain, (which remains stuck at 60/1) and I get the following warning:
DXGI Warning: IDXGISwapChain::Present: Fullscreen presentation inefficiencies incurred due to application not using IDXGISwapChain::ResizeBuffers appropriately, specifying a DXGI_MODE_DESC not available in IDXGIOutput::GetDisplayModeList, or not using DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH. DXGI_SWAP_CHAIN_DESC::BufferDesc = { 1280, 1024, { 60, 1 }, R8G8B8A8_UNORM, 0, 0 }; DXGI_SWAP_CHAIN_DESC::SampleDesc = { 1, 0 }; DXGI_SWAP_CHAIN_DESC::Flags = 0x2;
The text was updated successfully, but these errors were encountered:
This is a usage problem and unlikely an issue with SharpDX, so we can't really dig into this. You need to be careful with full screen modes, you have probably followed "DXGI Best Practices" but make sure to double check everything. In SharpDX, there is a working code for switching to fullscreen in the Toolkit SwapChainPresenter.IsFullscreen property.
Yes, I am following the DXGI recommendations, and my code is effectively identical to the sample you linked to. Calling the method ResizeTarget is supposed to set the refresh rate of the swapChain and it doesn't. Unless there is a specific reason as to why a swapChain has an immutable refresh rate, then this is a bug (though perhaps on the DirectX side rather than sharpdx)
p.s. Creating the swapchain with a modeDesc.RefreshRate = (0,0), AND calling twice swapChain.ResizeBuffers (once before SetFullscreen, and once right after) removes the warning.
Yet the swapChain refresh rate is still stuck at the original value (0,0)!
(p.s. this is on Windows 7)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
swapChain.ContainingOutput.GetClosestMatchingMode(device, modeDesc, out modeDesc);
swapChain.ResizeTarget(ref modeDesc);
When going to fullscreen mode, I make sure I use a ModeDescription that is supported by my monitor (in this case 60020/1000). The problem is though, that the ResizeTarget method does not change the refresh rate of the swapchain, (which remains stuck at 60/1) and I get the following warning:
DXGI Warning: IDXGISwapChain::Present: Fullscreen presentation inefficiencies incurred due to application not using IDXGISwapChain::ResizeBuffers appropriately, specifying a DXGI_MODE_DESC not available in IDXGIOutput::GetDisplayModeList, or not using DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH. DXGI_SWAP_CHAIN_DESC::BufferDesc = { 1280, 1024, { 60, 1 }, R8G8B8A8_UNORM, 0, 0 }; DXGI_SWAP_CHAIN_DESC::SampleDesc = { 1, 0 }; DXGI_SWAP_CHAIN_DESC::Flags = 0x2;
The text was updated successfully, but these errors were encountered: