diff options
| author | Egor <egor.yusov@gmail.com> | 2018-02-10 06:57:26 +0000 |
|---|---|---|
| committer | Egor <egor.yusov@gmail.com> | 2018-02-10 06:57:26 +0000 |
| commit | 3ce42d33888d4c7bcf5a27e51882315f00c287ac (patch) | |
| tree | 0d6071234937c123d2733b5076bd973ee725a3e1 /Graphics/GraphicsEngineD3D11 | |
| parent | Fixed Android build (diff) | |
| download | DiligentCore-3ce42d33888d4c7bcf5a27e51882315f00c287ac.tar.gz DiligentCore-3ce42d33888d4c7bcf5a27e51882315f00c287ac.zip | |
Replaced #ifdef PLATFORM_XXX with #if PLATFORM_XXX
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
| -rw-r--r-- | Graphics/GraphicsEngineD3D11/include/pch.h | 4 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp | 2 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineD3D11/src/SwapChainD3D11Impl.cpp | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/Graphics/GraphicsEngineD3D11/include/pch.h b/Graphics/GraphicsEngineD3D11/include/pch.h index 9a33b12a..91105ad7 100644 --- a/Graphics/GraphicsEngineD3D11/include/pch.h +++ b/Graphics/GraphicsEngineD3D11/include/pch.h @@ -38,9 +38,9 @@ #include <vector> #include <exception> #include <algorithm> -#if defined(PLATFORM_WIN32) +#if PLATFORM_WIN32 #include <d3d11.h> -#elif defined(PLATFORM_UNIVERSAL_WINDOWS) +#elif PLATFORM_UNIVERSAL_WINDOWS #include <d3d11_2.h> #endif diff --git a/Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp index c82385a4..34c0873a 100644 --- a/Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp +++ b/Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp @@ -128,7 +128,7 @@ void EngineFactoryD3D11Impl::CreateDeviceAndContextsD3D11( const EngineD3D11Attr // description. All applications are assumed to support 9.1 unless otherwise stated. D3D_FEATURE_LEVEL featureLevels[] = { -#ifdef PLATFORM_UNIVERSAL_WINDOWS +#if PLATFORM_UNIVERSAL_WINDOWS D3D_FEATURE_LEVEL_11_1, #endif D3D_FEATURE_LEVEL_11_0, diff --git a/Graphics/GraphicsEngineD3D11/src/SwapChainD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/SwapChainD3D11Impl.cpp index 76c7d928..01f4623d 100644 --- a/Graphics/GraphicsEngineD3D11/src/SwapChainD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/SwapChainD3D11Impl.cpp @@ -40,7 +40,7 @@ SwapChainD3D11Impl::SwapChainD3D11Impl(IReferenceCounters *pRefCounters, TSwapChainBase(pRefCounters, pRenderDeviceD3D11, pDeviceContextD3D11, SCDesc) { -#ifdef PLATFORM_WIN32 +#if PLATFORM_WIN32 auto hWnd = reinterpret_cast<HWND>(pNativeWndHandle); if( m_SwapChainDesc.Width == 0 || m_SwapChainDesc.Height == 0 ) @@ -79,7 +79,7 @@ SwapChainD3D11Impl::SwapChainD3D11Impl(IReferenceCounters *pRefCounters, CComPtr<IDXGISwapChain1> pSwapChain1; -#if defined( PLATFORM_WIN32 ) +#if PLATFORM_WIN32 // This sequence obtains the DXGI factory that was used to create the Direct3D device above. CComPtr<IDXGIDevice> pDXGIDevice; pDevice->QueryInterface(__uuidof(IDXGIDevice), reinterpret_cast<void**>( static_cast<IDXGIDevice**>(&pDXGIDevice) ) ); @@ -91,7 +91,7 @@ SwapChainD3D11Impl::SwapChainD3D11Impl(IReferenceCounters *pRefCounters, CHECK_D3D_RESULT_THROW( pDXGIFactory->CreateSwapChainForHwnd(pDevice, hWnd, &swapChainDesc, nullptr, nullptr, &pSwapChain1), "Failed to create DXGI swap chain" ); -#elif defined( PLATFORM_UNIVERSAL_WINDOWS ) +#elif PLATFORM_UNIVERSAL_WINDOWS CComPtr<IDXGIDevice3> pDXGIDevice; pDevice->QueryInterface(__uuidof(IDXGIDevice3), reinterpret_cast<void**>(static_cast<IDXGIDevice3**>(&pDXGIDevice))); @@ -173,7 +173,7 @@ IMPLEMENT_QUERY_INTERFACE( SwapChainD3D11Impl, IID_SwapChainD3D11, TSwapChainBas void SwapChainD3D11Impl::Present() { UINT SyncInterval = 0; -#ifdef PLATFORM_UNIVERSAL_WINDOWS +#if PLATFORM_UNIVERSAL_WINDOWS SyncInterval = 1; // Interval 0 is not supported on Windows Phone #endif |
