ANGLE: Fix compilation without d3d11
Change-Id: I0b772698cf521083e5ecf35a395af57100a50131 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
This commit is contained in:
parent
347cc69cb2
commit
584576aeee
@ -38,7 +38,7 @@ class InspectableNativeWindow;
|
|||||||
using namespace Microsoft::WRL;
|
using namespace Microsoft::WRL;
|
||||||
using namespace Microsoft::WRL::Wrappers;
|
using namespace Microsoft::WRL::Wrappers;
|
||||||
|
|
||||||
#else
|
#elif defined(ANGLE_ENABLE_D3D11)
|
||||||
typedef IDXGISwapChain DXGISwapChain;
|
typedef IDXGISwapChain DXGISwapChain;
|
||||||
typedef IDXGIFactory DXGIFactory;
|
typedef IDXGIFactory DXGIFactory;
|
||||||
#endif
|
#endif
|
||||||
@ -60,9 +60,11 @@ class NativeWindow
|
|||||||
#endif
|
#endif
|
||||||
static bool isValidNativeWindow(EGLNativeWindowType window);
|
static bool isValidNativeWindow(EGLNativeWindowType window);
|
||||||
|
|
||||||
|
#if defined(ANGLE_ENABLE_D3D11)
|
||||||
HRESULT createSwapChain(ID3D11Device* device, DXGIFactory* factory,
|
HRESULT createSwapChain(ID3D11Device* device, DXGIFactory* factory,
|
||||||
DXGI_FORMAT format, UINT width, UINT height,
|
DXGI_FORMAT format, UINT width, UINT height,
|
||||||
DXGISwapChain** swapChain);
|
DXGISwapChain** swapChain);
|
||||||
|
#endif
|
||||||
|
|
||||||
inline EGLNativeWindowType getNativeWindow() const { return mWindow; }
|
inline EGLNativeWindowType getNativeWindow() const { return mWindow; }
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ bool NativeWindow::isValidNativeWindow(EGLNativeWindowType window)
|
|||||||
return IsWindow(window) == TRUE;
|
return IsWindow(window) == TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(ANGLE_ENABLE_D3D11)
|
||||||
HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory,
|
HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory,
|
||||||
DXGI_FORMAT format, unsigned int width, unsigned int height,
|
DXGI_FORMAT format, unsigned int width, unsigned int height,
|
||||||
DXGISwapChain** swapChain)
|
DXGISwapChain** swapChain)
|
||||||
@ -65,4 +66,5 @@ HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory
|
|||||||
|
|
||||||
return factory->CreateSwapChain(device, &swapChainDesc, swapChain);
|
return factory->CreateSwapChain(device, &swapChainDesc, swapChain);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,57 @@
|
|||||||
|
From 1f993a2492a618becd4bf89ef0d6cb5d2c9aa67a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kai Koehne <kai.koehne@theqtcompany.com>
|
||||||
|
Date: Mon, 11 May 2015 15:17:12 +0200
|
||||||
|
Subject: [PATCH] ANGLE: Fix compilation without d3d11
|
||||||
|
|
||||||
|
Change-Id: I0b772698cf521083e5ecf35a395af57100a50131
|
||||||
|
---
|
||||||
|
src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/NativeWindow.h | 4 +++-
|
||||||
|
.../angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp | 2 ++
|
||||||
|
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/NativeWindow.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/NativeWindow.h
|
||||||
|
index 81b9ea7..0f70fe4 100644
|
||||||
|
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/NativeWindow.h
|
||||||
|
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/NativeWindow.h
|
||||||
|
@@ -38,7 +38,7 @@ class InspectableNativeWindow;
|
||||||
|
using namespace Microsoft::WRL;
|
||||||
|
using namespace Microsoft::WRL::Wrappers;
|
||||||
|
|
||||||
|
-#else
|
||||||
|
+#elif defined(ANGLE_ENABLE_D3D11)
|
||||||
|
typedef IDXGISwapChain DXGISwapChain;
|
||||||
|
typedef IDXGIFactory DXGIFactory;
|
||||||
|
#endif
|
||||||
|
@@ -60,9 +60,11 @@ class NativeWindow
|
||||||
|
#endif
|
||||||
|
static bool isValidNativeWindow(EGLNativeWindowType window);
|
||||||
|
|
||||||
|
+#if defined(ANGLE_ENABLE_D3D11)
|
||||||
|
HRESULT createSwapChain(ID3D11Device* device, DXGIFactory* factory,
|
||||||
|
DXGI_FORMAT format, UINT width, UINT height,
|
||||||
|
DXGISwapChain** swapChain);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
inline EGLNativeWindowType getNativeWindow() const { return mWindow; }
|
||||||
|
|
||||||
|
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp
|
||||||
|
index 9d8f0bb..0a4f45b 100644
|
||||||
|
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp
|
||||||
|
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp
|
||||||
|
@@ -37,6 +37,7 @@ bool NativeWindow::isValidNativeWindow(EGLNativeWindowType window)
|
||||||
|
return IsWindow(window) == TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if defined(ANGLE_ENABLE_D3D11)
|
||||||
|
HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory,
|
||||||
|
DXGI_FORMAT format, unsigned int width, unsigned int height,
|
||||||
|
DXGISwapChain** swapChain)
|
||||||
|
@@ -65,4 +66,5 @@ HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory
|
||||||
|
|
||||||
|
return factory->CreateSwapChain(device, &swapChainDesc, swapChain);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user