we can leverage prdp for a vulkan context

This commit is contained in:
SimoneN64
2024-09-18 14:03:27 +02:00
parent 8fe17d0dd7
commit 610990468d
2 changed files with 8 additions and 2 deletions

View File

@@ -7,4 +7,3 @@ list(APPEND SOURCES backends/imgui_impl_sdl3.cpp backends/imgui_impl_vulkan.cpp)
add_library(imgui ${SOURCES} ${HEADERS})
target_include_directories(imgui PRIVATE . backends ../SDL/include)
target_compile_definitions(imgui PUBLIC IMGUI_IMPL_VULKAN_USE_VOLK)

View File

@@ -2,6 +2,11 @@
#include <ParallelRDPWrapper.hpp>
#include <memory>
#include <rdp_device.hpp>
#include <imgui.h>
#include <imgui_impl_sdl3.h>
#include <imgui_impl_vulkan.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_vulkan.h>
using namespace Vulkan;
using namespace RDP;
@@ -141,6 +146,8 @@ void ParallelRDP::UpdateScreen(Util::IntrusivePtr<Image> image) {
cmd->begin_render_pass(wsi->get_device().get_swapchain_render_pass(SwapchainRenderPass::ColorOnly));
DrawFullscreenTexturedQuad(image, cmd);
ImGui::Render();
ImGui_ImplVulkan_RenderDrawData(ImGui::GetDrawData(), cmd->get_command_buffer());
cmd->end_render_pass();
wsi->get_device().submit(cmd);