ComplexPlotting/src/main.cpp

29 lines
612 B
C++
Raw Normal View History

2020-08-30 13:22:16 +02:00
#include <iostream>
2020-08-31 18:27:16 +02:00
#include <vector>
#include <algorithm>
#include <glad/glad.h>
2020-08-31 17:55:45 +02:00
#include <glfw/glfw3.h>
2020-08-30 13:22:16 +02:00
2020-09-01 14:02:37 +02:00
#include "PlotManager.hpp"
2020-08-31 18:27:16 +02:00
2020-08-30 13:22:16 +02:00
int main(int argc, char** argv)
{
2020-08-31 17:55:45 +02:00
int result = glfwInit();
if (result != GL_TRUE)
2020-08-30 13:22:16 +02:00
{
2020-08-31 17:55:45 +02:00
const char* buffer = new char[512];
glfwGetError(&buffer);
std::cout << "Failed to initialize GLFW: " << std::endl << buffer << std::endl;
2020-08-30 13:22:16 +02:00
}
2020-08-31 18:27:16 +02:00
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 6);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
2020-09-01 14:02:37 +02:00
while (PlotManager::isOpen)
2020-08-31 18:27:16 +02:00
{
glfwPollEvents();
2020-09-01 14:02:37 +02:00
PlotManager::Loop();
2020-08-31 18:27:16 +02:00
}
2020-08-30 13:22:16 +02:00
}