Vulkan: Fix imgui leaking viewport/scissor state into game rendering

This commit is contained in:
Exzap
2026-09-20 11:05:38 +02:00
parent 0d8ff87b6b
commit 71d92f66fc

View File

@@ -2069,6 +2069,10 @@ void VulkanRenderer::ImguiEnd()
ImGui::Render();
ImGui_ImplVulkan_RenderDrawData(ImGui::GetDrawData(), m_state.currentCommandBuffer);
vkCmdEndRenderPass(m_state.currentCommandBuffer);
// restore viewport and scissor box
vkCmdSetViewport(m_state.currentCommandBuffer, 0, 1, &m_state.currentViewport);
vkCmdSetScissor(m_state.currentCommandBuffer, 0, 1, &m_state.currentScissorRect);
}
ImTextureID VulkanRenderer::GenerateTexture(const std::vector<uint8>& data, const Vector2i& size)