diff options
Diffstat (limited to 'src/window.cpp')
| -rw-r--r-- | src/window.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/window.cpp b/src/window.cpp index 2b75cdd..8d40221 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2427,12 +2427,12 @@ void RecordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex) { vkCmdDraw(commandBuffer, 3, 1, 0, 0); // ImGui - if (isImGuiRenderActive) { + if (isImGuiRenderActive && pkeGameCallbacks.OnImGuiRender) { ImGui_ImplVulkan_NewFrame(); ImGui_ImplGlfw_NewFrame(); ImGui::NewFrame(); - Event_Dispatch<EventHandler>("RenderImGui"); + pkeGameCallbacks.OnImGuiRender(); ImGui::Render(); auto drawData = ImGui::GetDrawData(); @@ -2547,7 +2547,7 @@ void FramebufferResizeCallback(GLFWwindow *window, int width, int height) { shouldRecreateSwapchain = true; } -void CreateWindow(PKEWindowProperties *wp) { +void CreateWindow(PKEWindowProperties wp) { if (vkInstance != nullptr) return; MemBkt_Vulkan = Pke_BeginTransientBucket(); vulkanAllocs = Pke_New<DynArray<pke_vkAllocData>>(MemBkt_Vulkan); @@ -2555,7 +2555,7 @@ void CreateWindow(PKEWindowProperties *wp) { vulkanAllocs->Reserve(2048); glfwInit(); glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); - window = glfwCreateWindow(wp->width, wp->height, "Pikul", nullptr, nullptr); + window = glfwCreateWindow(wp.width, wp.height, "Pikul", nullptr, nullptr); InitVulkan(); glfwSetFramebufferSizeCallback(window, FramebufferResizeCallback); CreateSwapchain(); |
