diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-09-29 20:01:31 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-09-29 20:01:31 +0000 |
| commit | b79aa8b0252be60441931653e22454759d641d7c (patch) | |
| tree | e385a9802b7baeb293c32bd90b152e288abfc65d /Imgui/src/ImGuiImplDiligent.cpp | |
| parent | Updated ImGuiUtils (diff) | |
| download | DiligentTools-b79aa8b0252be60441931653e22454759d641d7c.tar.gz DiligentTools-b79aa8b0252be60441931653e22454759d641d7c.zip | |
Imgui implementation: fixed few Vulkan issues
Diffstat (limited to 'Imgui/src/ImGuiImplDiligent.cpp')
| -rw-r--r-- | Imgui/src/ImGuiImplDiligent.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Imgui/src/ImGuiImplDiligent.cpp b/Imgui/src/ImGuiImplDiligent.cpp index ededaf9..1653823 100644 --- a/Imgui/src/ImGuiImplDiligent.cpp +++ b/Imgui/src/ImGuiImplDiligent.cpp @@ -38,10 +38,12 @@ class ImGuiImplDiligent_Internal public: ImGuiImplDiligent_Internal(IRenderDevice* pDevice, TEXTURE_FORMAT BackBufferFmt, + TEXTURE_FORMAT DepthBufferFmt, Uint32 InitialVertexBufferSize, Uint32 InitialIndexBufferSize) : m_pDevice (pDevice), m_BackBufferFmt (BackBufferFmt), + m_DepthBufferFmt (DepthBufferFmt), m_VertexBufferSize(InitialVertexBufferSize), m_IndexBufferSize (InitialIndexBufferSize) { @@ -79,6 +81,7 @@ private: RefCntAutoPtr<ITextureView> m_pFontSRV; RefCntAutoPtr<IShaderResourceBinding> m_pSRB; const TEXTURE_FORMAT m_BackBufferFmt; + const TEXTURE_FORMAT m_DepthBufferFmt; Uint32 m_VertexBufferSize = 0; Uint32 m_IndexBufferSize = 0; }; @@ -177,6 +180,7 @@ void ImGuiImplDiligent_Internal::CreateDeviceObjects() GraphicsPipeline.NumRenderTargets = 1; GraphicsPipeline.RTVFormats[0] = m_BackBufferFmt; + GraphicsPipeline.DSVFormat = m_DepthBufferFmt; GraphicsPipeline.PrimitiveTopology = PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; GraphicsPipeline.pVS = pVS; @@ -419,9 +423,10 @@ void ImGuiImplDiligent_Internal::RenderDrawData(IDeviceContext* pCtx, ImDrawData ImGuiImplDiligent::ImGuiImplDiligent(IRenderDevice* pDevice, TEXTURE_FORMAT BackBufferFmt, + TEXTURE_FORMAT DepthBufferFmt, Uint32 InitialVertexBufferSize, Uint32 InitialIndexBufferSize) : - m_pImpl(new ImGuiImplDiligent_Internal(pDevice, BackBufferFmt, InitialVertexBufferSize, InitialIndexBufferSize)) + m_pImpl(new ImGuiImplDiligent_Internal(pDevice, BackBufferFmt, DepthBufferFmt, InitialVertexBufferSize, InitialIndexBufferSize)) { } |
