summaryrefslogtreecommitdiffstats
path: root/Imgui/src
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-09-29 20:01:31 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-09-29 20:01:31 +0000
commitb79aa8b0252be60441931653e22454759d641d7c (patch)
treee385a9802b7baeb293c32bd90b152e288abfc65d /Imgui/src
parentUpdated ImGuiUtils (diff)
downloadDiligentTools-b79aa8b0252be60441931653e22454759d641d7c.tar.gz
DiligentTools-b79aa8b0252be60441931653e22454759d641d7c.zip
Imgui implementation: fixed few Vulkan issues
Diffstat (limited to 'Imgui/src')
-rw-r--r--Imgui/src/ImGuiImplDiligent.cpp7
-rw-r--r--Imgui/src/ImGuiImplWin32.cpp3
2 files changed, 8 insertions, 2 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))
{
}
diff --git a/Imgui/src/ImGuiImplWin32.cpp b/Imgui/src/ImGuiImplWin32.cpp
index 3daa513..647fde3 100644
--- a/Imgui/src/ImGuiImplWin32.cpp
+++ b/Imgui/src/ImGuiImplWin32.cpp
@@ -38,9 +38,10 @@ namespace Diligent
ImGuiImplWin32::ImGuiImplWin32(HWND hWnd,
IRenderDevice* pDevice,
TEXTURE_FORMAT BackBufferFmt,
+ TEXTURE_FORMAT DepthBufferFmt,
Uint32 InitialVertexBufferSize,
Uint32 InitialIndexBufferSize) :
- ImGuiImplDiligent(pDevice, BackBufferFmt, InitialVertexBufferSize, InitialIndexBufferSize)
+ ImGuiImplDiligent(pDevice, BackBufferFmt, DepthBufferFmt, InitialVertexBufferSize, InitialIndexBufferSize)
{
ImGui_ImplWin32_Init(hWnd);
}