refactor
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -12,6 +12,8 @@ class ImguiModule : public Archimedes::Module {
|
||||
public:
|
||||
ImguiModule(Archimedes::App*, void*);
|
||||
|
||||
ImguiModule() { name = "ImguiModule"; }
|
||||
|
||||
~ImguiModule();
|
||||
|
||||
void onLoad();
|
||||
|
||||
Reference in New Issue
Block a user