#include #include #include #include "funcs.h" #include "shader.h" int main() { std::cout << "Hello World!\n"; glfwInit(); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 4); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow* window = glfwCreateWindow(800, 600, "Howdy!", NULL, NULL); if (window == NULL) { std::cout << "Could not open window!\n"; glfwTerminate(); return -1; } glfwMakeContextCurrent(window); if (!gladLoadGLLoader((GLADloadproc) glfwGetProcAddress)) { std::cout << "Could not initialize GLAD!\n"; return -1; } glViewport(0, 0, 800, 600); glfwSetFramebufferSizeCallback(window, framebuffer_callback); while(!glfwWindowShouldClose(window)) { processInputs(window); glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glfwPollEvents(); glfwSwapBuffers(window); } glfwTerminate(); return 0; }