2022-08-29 21:01:55 +02:00
|
|
|
#ifndef MAIN_CPP
|
2022-09-05 20:17:25 +02:00
|
|
|
#define MAIN_CPP
|
2022-08-28 19:20:00 +02:00
|
|
|
#include <glad/glad.h>
|
2022-08-27 21:43:58 +02:00
|
|
|
#include <GLFW/glfw3.h>
|
2022-08-28 19:20:00 +02:00
|
|
|
|
2022-08-29 19:53:36 +02:00
|
|
|
#include <iostream>
|
2022-08-30 20:02:22 +02:00
|
|
|
#include <random> // I am using standart library RNG because I am lazy and wanted to create quick code snippet
|
|
|
|
|
// upgrade to this: https://arvid.io/2018/06/30/on-cxx-random-number-generator-quality/ whenever, if ever I feel like it
|
|
|
|
|
#include <chrono> // for std::chrono
|
|
|
|
|
|
2022-08-29 21:01:55 +02:00
|
|
|
#include "constants.hpp"
|
2022-09-05 20:17:25 +02:00
|
|
|
#include "beforeRender.hpp"
|
|
|
|
|
#include "misc.hpp"
|
|
|
|
|
#include "renderLoop.hpp"
|
2022-08-29 21:01:55 +02:00
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
2022-09-06 21:52:06 +02:00
|
|
|
// changed in glfwWindowShouldClose
|
2022-09-07 18:34:50 +02:00
|
|
|
GLFWwindow *window = prepareForRender();
|
|
|
|
|
if (window == NULL)
|
|
|
|
|
return -1;
|
2022-08-29 21:01:55 +02:00
|
|
|
renderLoop(window);
|
|
|
|
|
|
2022-08-30 20:02:22 +02:00
|
|
|
// clean GLFW resources
|
|
|
|
|
glfwTerminate();
|
2022-08-28 19:20:00 +02:00
|
|
|
return 0;
|
2022-08-29 21:01:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|