[nostaliga,turbine] Move rest of ImGui init to Turbine

This commit is contained in:
2023-06-03 01:07:38 -05:00
parent 37f6c388fc
commit 6593d429fe
4 changed files with 5 additions and 7 deletions

View File

@ -5,6 +5,7 @@
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <imgui_impl_glfw.h>
#include <imgui_impl_opengl3.h>
#include <ox/std/defines.hpp>
@ -228,6 +229,7 @@ ox::Error initGfx(Context &ctx) noexcept {
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
//io.MouseDrawCursor = true;
ImGui_ImplGlfw_InitForOpenGL(gctx.window, true);
ImGui_ImplOpenGL3_Init();
themeImgui();
}
return {};

View File

@ -84,6 +84,8 @@ ox::Error run(Context &ctx) noexcept {
void shutdown(Context &ctx) noexcept {
auto &gctx = static_cast<GlfwContext&>(ctx);
if (gctx.window) {
ImGui_ImplOpenGL3_Shutdown();
ImGui_ImplGlfw_Shutdown();
glfwDestroyWindow(gctx.window);
gctx.window = nullptr;
}