This commit is contained in:
2025-04-17 14:58:22 -05:00
parent f36f6ae125
commit a1e9401aaa
23 changed files with 157 additions and 44 deletions

View File

@@ -14,22 +14,26 @@ ImguiModule::ImguiModule(Archimedes::App* a, void* h = nullptr) : Archimedes::Mo
name = "ImguiModule";
WindowModule* wm = new WindowModule(a, h);
deps[wm->getName()] = wm;
deps[*wm] = wm;
}
ImguiModule::~ImguiModule() {
WindowModule* wm = (WindowModule*) moduleInstances["WindowModule"];
wm->getRenderer()->getCmdList().erase(rcmd_it);
ImGui_ImplOpenGL3_Shutdown();
ImGui_ImplGlfw_Shutdown();
ImGui::DestroyContext();
if(app) {
WindowModule* wm; { wm = (WindowModule*) moduleInstances[WindowModule()]; }
wm->getRenderer()->getCmdList().erase(rcmd_it);
ImGui_ImplOpenGL3_Shutdown();
ImGui_ImplGlfw_Shutdown();
ImGui::DestroyContext();
}
}
void ImguiModule::onLoad() {
WindowModule* wm = (WindowModule*) moduleInstances["WindowModule"];
WindowModule* wm; { wm = (WindowModule*) moduleInstances[WindowModule()]; }
if(!wm) {
std::cout << "No WindowModule for ImguiModule!\n";
std::abort();

View File

@@ -12,6 +12,8 @@ class ImguiModule : public Archimedes::Module {
public:
ImguiModule(Archimedes::App*, void*);
ImguiModule() { name = "ImguiModule"; }
~ImguiModule();
void onLoad();