[nostaliga,turbine] Move rest of ImGui init to Turbine
This commit is contained in:
@ -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 {};
|
||||
|
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user