#include #include #include #include #include #include "scene.h" int main(){ if (!glfwInit()) { std::cerr << "Failed to initialize GLFW" << std::endl; return -1; } GLFWwindow* window = glfwCreateWindow(800, 600, "TerraVisor", nullptr, nullptr); if(!window) { std::cerr << "Failed to create GLFW window" << std::endl; glfwTerminate(); return -1; } glfwMakeContextCurrent(window); glewExperimental = GL_TRUE; if(glewInit() != GLEW_OK) { std::cerr << "Failed to initialize GLEW" << std::endl; return -1; } Scene::Init(); //Init ImGui IMGUI_CHECKVERSION(); ImGui::CreateContext(); ImGui_ImplGlfw_InitForOpenGL(window, true); ImGui_ImplOpenGL3_Init("#version 150"); while (!glfwWindowShouldClose(window)) { Scene::Idle(); Scene::Display(window); glfwPollEvents(); } // Cleanup ImGui ImGui_ImplOpenGL3_Shutdown(); ImGui_ImplGlfw_Shutdown(); ImGui::DestroyContext(); glfwDestroyWindow(window); glfwTerminate(); return 0; }