work on layers
This commit is contained in:
@@ -12,9 +12,7 @@ TestImgui::TestImgui(void* h, Archimedes::App* a) : Archimedes::GuiModule(h, a)
|
||||
}
|
||||
|
||||
TestImgui::~TestImgui() {
|
||||
ImGui_ImplOpenGL3_Shutdown();
|
||||
ImGui_ImplGlfw_Shutdown();
|
||||
ImGui::DestroyContext();
|
||||
|
||||
}
|
||||
|
||||
void TestImgui::onLoad() {
|
||||
@@ -86,9 +84,7 @@ void TestImgui::TILayer::onAttach() {
|
||||
//ImGui::StyleColorsLight();
|
||||
|
||||
// Setup Platform/Renderer backends
|
||||
GLFWwindow* w = wm->getWindow()->getWindowImpl().getWindow();
|
||||
|
||||
if(!ImGui_ImplGlfw_InitForOpenGL(w, true))
|
||||
if(!ImGui_ImplGlfw_InitForOpenGL(wm->getWindow()->getWindowImpl().getWindow(), true))
|
||||
std::cout << "GLFWImpl failed\n";
|
||||
if(!ImGui_ImplOpenGL3_Init("#version 330")) {
|
||||
std::cout << "ImGui_ImplOpenGL3_Init failed!\n" << std::endl;
|
||||
@@ -107,6 +103,9 @@ void TestImgui::TILayer::onRender() {
|
||||
}
|
||||
|
||||
void TestImgui::TILayer::onDetach() {
|
||||
ImGui_ImplOpenGL3_Shutdown();
|
||||
ImGui_ImplGlfw_Shutdown();
|
||||
ImGui::DestroyContext();
|
||||
}
|
||||
|
||||
bool TestImgui::TILayer::onEvent(const Archimedes::Event&) { return false; }
|
||||
|
||||
Reference in New Issue
Block a user