#include "ltpch.h" #include "glUserInterface.h" #include "Events/KeyboardEvents.h" #include "Events/MouseEvents.h" #include #include #include namespace Light { glUserInterface::glUserInterface(GLFWwindow* windowHandle) { IMGUI_CHECKVERSION(); ImGui::CreateContext(); ImGuiIO& io = ImGui::GetIO(); io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; ImGui::StyleColorsDark(); ImGui_ImplGlfw_InitForOpenGL(windowHandle, false); ImGui_ImplOpenGL3_Init(); } glUserInterface::~glUserInterface() { ImGui_ImplOpenGL3_Shutdown(); ImGui_ImplGlfw_Shutdown(); ImGui::DestroyContext(); } void glUserInterface::Begin() { ImGui_ImplOpenGL3_NewFrame(); ImGui_ImplGlfw_NewFrame(); ImGui::NewFrame(); ImGui::ShowDemoWindow(); } void glUserInterface::End() { ImGui::Render(); ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); } }