22#include <kiwano/macros.h>
23#include <kiwano/render/DirectX/helper.h>
24#include <kiwano/render/DirectX/D3DDeviceResourcesBase.h>
34MIDL_INTERFACE(
"3ede2b87-a202-4799-a39b-2308ad34cae8")
35KGE_API ID3D11DeviceResources : public ID3DDeviceResourcesBase
38 inline ID3D11Device* GetDevice()
44 inline ID3D11DeviceContext* GetDeviceContext()
46 KGE_ASSERT(device_context_);
47 return device_context_.Get();
50 inline ID3D11RenderTargetView* GetRenderTargetView()
53 return rt_view_.Get();
56 inline ID3D11DepthStencilView* GetDepthStencilView()
59 return ds_view_.Get();
62 inline IDXGIFactory* GetDXGIFactory()
64 KGE_ASSERT(dxgi_factory_);
65 return dxgi_factory_.Get();
68 inline IDXGIDevice* GetDXGIDevice()
70 KGE_ASSERT(dxgi_device_);
71 return dxgi_device_.Get();
74 inline IDXGISwapChain* GetDXGISwapChain()
76 KGE_ASSERT(dxgi_swap_chain_);
77 return dxgi_swap_chain_.Get();
81 ComPtr<ID3D11Device> device_;
82 ComPtr<ID3D11DeviceContext> device_context_;
83 ComPtr<ID3D11RenderTargetView> rt_view_;
84 ComPtr<ID3D11DepthStencilView> ds_view_;
85 ComPtr<IDXGIFactory> dxgi_factory_;
86 ComPtr<IDXGIDevice> dxgi_device_;
87 ComPtr<IDXGISwapChain> dxgi_swap_chain_;
90extern ComPtr<ID3D11DeviceResources> GetD3D11DeviceResources();