diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-03-30 01:47:48 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-03-30 01:47:48 +0000 |
| commit | f3a224a1f19e9d67cb683a965d1fb88636eabf6c (patch) | |
| tree | d534df76090785f2ef70eb9634d07aa0be0f52dc /Graphics/GraphicsEngineD3D11 | |
| parent | Added shader name output when shader compilation fails (diff) | |
| download | DiligentCore-f3a224a1f19e9d67cb683a965d1fb88636eabf6c.tar.gz DiligentCore-f3a224a1f19e9d67cb683a965d1fb88636eabf6c.zip | |
Implemented hardware adapter and display mode enumeration
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
4 files changed, 14 insertions, 2 deletions
diff --git a/Graphics/GraphicsEngineD3D11/CMakeLists.txt b/Graphics/GraphicsEngineD3D11/CMakeLists.txt index 02178d07..d8d1759b 100644 --- a/Graphics/GraphicsEngineD3D11/CMakeLists.txt +++ b/Graphics/GraphicsEngineD3D11/CMakeLists.txt @@ -115,6 +115,7 @@ set(PRIVATE_DEPENDENCIES GraphicsEngineD3DBase TargetPlatform Common + dxgi.lib d3d11.lib d3dcompiler.lib ) diff --git a/Graphics/GraphicsEngineD3D11/include/pch.h b/Graphics/GraphicsEngineD3D11/include/pch.h index 91105ad7..7285fd95 100644 --- a/Graphics/GraphicsEngineD3D11/include/pch.h +++ b/Graphics/GraphicsEngineD3D11/include/pch.h @@ -52,4 +52,4 @@ #include "RenderDeviceBase.h" #include "D3D11TypeConversions.h" #include "ValidatedCast.h" -#include <atlcomcli.h>
\ No newline at end of file +#include <atlcomcli.h> diff --git a/Graphics/GraphicsEngineD3D11/interface/RenderDeviceFactoryD3D11.h b/Graphics/GraphicsEngineD3D11/interface/RenderDeviceFactoryD3D11.h index 1f999e8a..84154472 100644 --- a/Graphics/GraphicsEngineD3D11/interface/RenderDeviceFactoryD3D11.h +++ b/Graphics/GraphicsEngineD3D11/interface/RenderDeviceFactoryD3D11.h @@ -61,6 +61,15 @@ public: IRenderDevice **ppDevice, IDeviceContext **ppContexts, Uint32 NumDeferredContexts) = 0; + + virtual void EnumerateHardwareAdapters(Uint32 &NumAdapters, + HardwareAdapterAttribs *Adapters) = 0; + + virtual void EnumerateDisplayModes(Uint32 AdapterId, + Uint32 OutputId, + TEXTURE_FORMAT Format, + Uint32 &NumDisplayModes, + DisplayModeAttribs *DisplayModes) = 0; }; #if ENGINE_DLL diff --git a/Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp index 9e5a5981..e6a1f711 100644 --- a/Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp +++ b/Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp @@ -31,13 +31,15 @@ #include "SwapChainD3D11Impl.h" #include "D3D11TypeConversions.h" #include "EngineMemory.h" +#include "EngineFactoryD3DBase.h" #include <Windows.h> +#include <dxgi1_2.h> namespace Diligent { /// Engine factory for D3D11 implementation -class EngineFactoryD3D11Impl : public IEngineFactoryD3D11 +class EngineFactoryD3D11Impl : public EngineFactoryD3DBase<IEngineFactoryD3D11, DeviceType::D3D11> { public: static EngineFactoryD3D11Impl* GetInstance() |
