engineer-thesis-WUT/Engine/engine/match.cpp

32 lines
755 B
C++
Raw Normal View History

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
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>
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 "./constants.hpp"
#include "./beforeRender.hpp"
#include "./misc.hpp"
#include "./renderLoop.hpp"
2022-08-29 21:01:55 +02:00
2023-03-12 17:32:42 +01: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();
2022-12-11 18:49:16 +01:00
if (window == nullptr)
2022-09-07 18:34:50 +02:00
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
}
2023-03-12 17:32:42 +01:00
#endif // #ifndef MAIN_CPP