diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2023-12-05 13:07:57 -0500 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2023-12-05 13:07:57 -0500 |
| commit | c349359e71170c2fa78ac0fa22df07932ab47210 (patch) | |
| tree | 74795fee5b64fe94683c6078d3b50ec5112a4707 /src/window.cpp | |
| parent | 6e498a3781f5ccbbaa6cf5e407cf67722624760f (diff) | |
minor refactor for plugins
Diffstat (limited to 'src/window.cpp')
| -rw-r--r-- | src/window.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/window.cpp b/src/window.cpp index 8d40221..f9b6ff2 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1,6 +1,8 @@ #define GLFW_INCLUDE_NONE #define GLFW_INCLUDE_VULKAN +#include "window.hpp" + #include "asset-manager.hpp" #include "camera.hpp" #include "ecs.hpp" @@ -9,8 +11,8 @@ #include "game-settings.hpp" #include "helpers.hpp" #include "memory.hpp" +#include "plugins.hpp" #include "static/cube.hpp" -#include "window.hpp" #include "window-types.hpp" #include "glm/ext/matrix_transform.hpp" @@ -111,7 +113,6 @@ ImplementedPipelines pkePipelines{}; /* * ImGui */ -bool isImGuiRenderActive = true; VkDescriptorPool imGuiDescriptorPool; const std::vector<const char *> REQUIRED_EXTENSIONS = std::vector<const char *> { @@ -2427,12 +2428,12 @@ void RecordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex) { vkCmdDraw(commandBuffer, 3, 1, 0, 0); // ImGui - if (isImGuiRenderActive && pkeGameCallbacks.OnImGuiRender) { + if (pkePlugin.OnImGuiRender) { ImGui_ImplVulkan_NewFrame(); ImGui_ImplGlfw_NewFrame(); ImGui::NewFrame(); - pkeGameCallbacks.OnImGuiRender(); + pkePlugin.OnImGuiRender(); ImGui::Render(); auto drawData = ImGui::GetDrawData(); |
