From 4c73f2d3fd5305b82d3413ebeab74cc566b57f33 Mon Sep 17 00:00:00 2001 From: assiduous Date: Sun, 2 Feb 2020 15:07:25 -0800 Subject: Updated swap chain creation functions to use NativeWindow struct --- Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Graphics/GraphicsEngineD3DBase') diff --git a/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.hpp b/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.hpp index b1088b4f..9479d72e 100644 --- a/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.hpp +++ b/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.hpp @@ -47,11 +47,11 @@ public: IDeviceContext* pDeviceContext, const SwapChainDesc& SCDesc, const FullScreenModeDesc& FSDesc, - void* pNativeWndHandle) : + const NativeWindow& Window) : // clang-format off TBase{pRefCounters, pDevice, pDeviceContext, SCDesc}, m_FSDesc {FSDesc}, - m_pNativeWndHandle {pNativeWndHandle} + m_Window {Window} // clang-format on {} @@ -74,7 +74,7 @@ protected: void CreateDXGISwapChain(IUnknown* pD3D11DeviceOrD3D12CmdQueue) { #if PLATFORM_WIN32 - auto hWnd = reinterpret_cast(m_pNativeWndHandle); + auto hWnd = reinterpret_cast(m_Window.hWnd); if (m_SwapChainDesc.Width == 0 || m_SwapChainDesc.Height == 0) { RECT rc; @@ -194,7 +194,7 @@ protected: hr = factory->CreateSwapChainForCoreWindow( pD3D11DeviceOrD3D12CmdQueue, - reinterpret_cast(m_pNativeWndHandle), + reinterpret_cast(m_Window.pWindow), &swapChainDesc, nullptr, &pSwapChain1); @@ -242,7 +242,7 @@ protected: FullScreenModeDesc m_FSDesc; CComPtr m_pSwapChain; - void* m_pNativeWndHandle; + NativeWindow m_Window; }; } // namespace Diligent -- cgit v1.2.3