Add ui logic for renderer
This commit is contained in:
@@ -44,7 +44,7 @@ namespace openVulkanoCpp::Vulkan
|
||||
vkInfo.Device = context->device->device;
|
||||
vkInfo.QueueFamily = context->device->queueIndices.GetGraphics();
|
||||
vkInfo.Queue = context->device->graphicsQueue;
|
||||
//vkInfo.PipelineCache = NULL;
|
||||
//vkInfo.PipelineCache = ;
|
||||
vkInfo.DescriptorPool = descriptorPool;
|
||||
vkInfo.Subpass = 0;
|
||||
vkInfo.MinImageCount = context->swapChain.GetImageCount();
|
||||
@@ -54,12 +54,11 @@ namespace openVulkanoCpp::Vulkan
|
||||
|
||||
ImGui::CreateContext();
|
||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;
|
||||
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
|
||||
|
||||
ImGui_ImplVulkan_Init(&vkInfo, uiRenderPass.renderPass);
|
||||
//ImGui_ImplVulkan_Init(&vkInfo, context->swapChainRenderPass.renderPass);
|
||||
#ifdef GLFW_AVAILABLE
|
||||
ImGui_ImplGlfw_InitForVulkan((GLFWwindow*)context->window->GetNativeWindowHandle(), true);
|
||||
#endif
|
||||
@@ -82,8 +81,10 @@ namespace openVulkanoCpp::Vulkan
|
||||
|
||||
void UiRenderer::DrawUiFrame(vk::CommandBuffer& cmdBuffer)
|
||||
{
|
||||
if (!ui) return;
|
||||
BeginUiFrame();
|
||||
ImGui::ShowDemoWindow();
|
||||
|
||||
ui->Render();
|
||||
|
||||
ImGui::Render();
|
||||
uiRenderPass.Begin(cmdBuffer, true);
|
||||
|
||||
Reference in New Issue
Block a user