diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-11-10 20:00:34 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-11-10 20:00:34 +0000 |
| commit | 99454f9aff426d652b4a166894b72d7b706f4287 (patch) | |
| tree | 6c588236cf41e15850ccd1e3a91535991ba86255 /Graphics/GraphicsEngineD3DBase | |
| parent | Fixed release build error (diff) | |
| download | DiligentCore-99454f9aff426d652b4a166894b72d7b706f4287.tar.gz DiligentCore-99454f9aff426d652b4a166894b72d7b706f4287.zip | |
Implemented ResolveTextureSubresource in GL backend (fixed https://github.com/DiligentGraphics/DiligentCore/issues/108)
Diffstat (limited to 'Graphics/GraphicsEngineD3DBase')
| -rw-r--r-- | Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.h | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.h b/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.h index 1b8671b3..84a29a54 100644 --- a/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.h +++ b/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.h @@ -37,15 +37,15 @@ namespace Diligent { public: using TBase = SwapChainBase<BaseInterface>; - SwapChainD3DBase(IReferenceCounters *pRefCounters, - IRenderDevice *pDevice, - IDeviceContext *pDeviceContext, - const SwapChainDesc& SCDesc, - const FullScreenModeDesc& FSDesc, - void* pNativeWndHandle) : - TBase(pRefCounters, pDevice, pDeviceContext, SCDesc), - m_FSDesc(FSDesc), - m_pNativeWndHandle(pNativeWndHandle) + SwapChainD3DBase(IReferenceCounters* pRefCounters, + IRenderDevice* pDevice, + IDeviceContext* pDeviceContext, + const SwapChainDesc& SCDesc, + const FullScreenModeDesc& FSDesc, + void* pNativeWndHandle) : + TBase{pRefCounters, pDevice, pDeviceContext, SCDesc}, + m_FSDesc {FSDesc}, + m_pNativeWndHandle {pNativeWndHandle} {} ~SwapChainD3DBase() @@ -99,6 +99,9 @@ namespace Diligent // create RGBA8_UNORM_SRGB render target view swapChainDesc.Format = DXGIColorBuffFmt == DXGI_FORMAT_R8G8B8A8_UNORM_SRGB ? DXGI_FORMAT_R8G8B8A8_UNORM : DXGIColorBuffFmt; swapChainDesc.Stereo = FALSE; + + // Multi-sampled swap chains are not supported anymore. CreateSwapChainForHwnd() fails when sample count is not 1 + // for any swap effect. swapChainDesc.SampleDesc.Count = 1; swapChainDesc.SampleDesc.Quality = 0; @@ -193,13 +196,13 @@ namespace Diligent // https://msdn.microsoft.com/en-us/library/windows/desktop/bb205075(v=vs.85).aspx#Destroying if (m_FSDesc.Fullscreen) m_pSwapChain->SetFullscreenState(FALSE, nullptr); - m_FSDesc.Fullscreen = True; - m_FSDesc.RefreshRateNumerator = DisplayMode.RefreshRateNumerator; + m_FSDesc.Fullscreen = True; + m_FSDesc.RefreshRateNumerator = DisplayMode.RefreshRateNumerator; m_FSDesc.RefreshRateDenominator = DisplayMode.RefreshRateDenominator; - m_FSDesc.Scaling = DisplayMode.Scaling; - m_FSDesc.ScanlineOrder = DisplayMode.ScanlineOrder; - m_SwapChainDesc.Width = DisplayMode.Width; - m_SwapChainDesc.Height = DisplayMode.Height; + m_FSDesc.Scaling = DisplayMode.Scaling; + m_FSDesc.ScanlineOrder = DisplayMode.ScanlineOrder; + m_SwapChainDesc.Width = DisplayMode.Width; + m_SwapChainDesc.Height = DisplayMode.Height; if (DisplayMode.Format != TEX_FORMAT_UNKNOWN) m_SwapChainDesc.ColorBufferFormat = DisplayMode.Format; UpdateSwapChain(true); |
