2023-03-12 16:24:48 +01:00
|
|
|
// "Copyright [2023] <Krzysztof Rudnicki>"
|
2022-08-29 21:01:55 +02:00
|
|
|
#ifndef MAIN_CPP
|
2022-09-05 20:17:25 +02:00
|
|
|
#define MAIN_CPP
|
2023-03-14 01:56:29 +01:00
|
|
|
#include <glad/glad.h>
|
2023-03-14 02:17:42 +01:00
|
|
|
#include <GLFW/glfw3.h>
|
2022-08-28 19:20:00 +02:00
|
|
|
|
2022-08-29 19:53:36 +02:00
|
|
|
#include <iostream>
|
2023-03-12 17:32:42 +01:00
|
|
|
#include <random>
|
|
|
|
|
// I am using standard 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
|
2022-08-30 20:02:22 +02:00
|
|
|
|
2023-03-12 17:32:42 +01:00
|
|
|
#include "./beforeRender.hpp"
|
2023-03-14 01:56:29 +01:00
|
|
|
#include "./constants.hpp"
|
2023-03-12 17:32:42 +01:00
|
|
|
#include "./misc.hpp"
|
|
|
|
|
#include "./renderLoop.hpp"
|
2022-08-29 21:01:55 +02:00
|
|
|
|
2023-03-12 17:32:42 +01:00
|
|
|
int main() {
|
2023-03-14 01:56:29 +01:00
|
|
|
// changed in glfwWindowShouldClose
|
|
|
|
|
GLFWwindow *window = prepareForRender();
|
|
|
|
|
if (window == nullptr) return -1;
|
|
|
|
|
renderLoop(window);
|
2022-08-29 21:01:55 +02:00
|
|
|
|
2023-03-14 01:56:29 +01:00
|
|
|
// clean GLFW resources
|
|
|
|
|
glfwTerminate();
|
|
|
|
|
return 0;
|
2022-08-29 21:01:55 +02:00
|
|
|
}
|
|
|
|
|
|
2023-03-12 17:32:42 +01:00
|
|
|
#endif // #ifndef MAIN_CPP
|