diff --git a/src/gooey.h b/src/gooey.h index d6fba1b..7a31bc0 100644 --- a/src/gooey.h +++ b/src/gooey.h @@ -18,6 +18,7 @@ void renderGooey(SDL_Handles &handles, HexDrawMode &mode); bool initGooey(SDL_Handles &handles, v2i vp_dims /*TODO: pass in game state*/) { + IMGUI_CHECKVERSION(); ImGui::CreateContext(); ImGuiIO& io = ImGui::GetIO(); (void)io; ImGui_ImplSdlGL3_Init(handles.window); @@ -32,6 +33,7 @@ void shutdownGooey() { ImGui_ImplSdlGL3_Shutdown(); + ImGui::DestroyContext(); } bool @@ -75,6 +77,7 @@ renderGooey(SDL_Handles &handles, HexDrawMode &mode, bool &is_debug) ImGui::SameLine(); ImGui::TextUnformatted(is_debug ? "true" : "false"); ImGui::Render(); + ImGui_ImplSdlGL3_RenderDrawData(ImGui::GetDrawData()); } #endif // GOOEY_H