-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
93 lines (80 loc) · 2.66 KB
/
main.cpp
File metadata and controls
93 lines (80 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <iostream>
#include <memory>
#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
#include "test/hello.hpp"
#include "utils/glsl_program.hpp"
#include "app/application.hpp"
#include "app/triangleApp.hpp"
#include "app/initSceneApp.hpp"
#include "app/cameraTestApp.hpp"
#include "app/testPhysicsApp.hpp"
#include "app/testPhysicsTwoApp.hpp"
#include "app/testPhysicsThreeApp.hpp"
#include "app/modelImportApp.hpp"
#include "utils/collision_system.hpp"
#include "app/lightingTestApp.hpp"
#include "app/lightingTestApp2.hpp"
#include "app/glowTestApp.hpp"
#include "app/audioTestApp.hpp"
#include "app/audioPlayerTestApp.hpp"
#include "app/minimalAudioTestApp.hpp"
#include "app/final/finalSceneApp.hpp"
#include "app/skeletalAnimationApp.hpp"
Options getOptions(int argc, char* argv[]) {
Options options;
options.windowTitle = "The world's best game!!!!!";
options.windowWidth = 1920;
options.windowHeight = 1080;
// options.windowWidth = 2540;
// options.windowHeight = 1300;
options.windowResizable = false;
options.vSync = true;
options.msaa = true;
options.glVersion = {3, 3};
options.backgroundColor = glm::vec4(0.0f, 0.0f, 0.0f, 1.0f);
options.assetRootDir = "./";
return options;
}
void framebuffer_size_callback(GLFWwindow* window, int width, int height);
void processInput(GLFWwindow* window);
// settings
const unsigned int SCR_WIDTH = 1280;
const unsigned int SCR_HEIGHT = 720;
std::unique_ptr<GLSLProgram> shader;
int main(int argc, char *argv[]) {
Options options = getOptions(argc, argv);
try {
// TriangleApp app(options);
// InitSceneApp app(options);
// CameraTestApp app(options);
// InitSceneApp app(options);
// CameraTestApp app(options);
// TestPhysicsApp app(options);
// TestPhysicsTwoApp app(options);
// TestPhysicsThreeApp app(options);
// lightingTestApp app(options);
// lightingTestApp2 app(options);
// GlowTestApp app(options);
// AudioTestApp app(options);
// AudioPlayerTestApp app(options);
// MinimalAudioTestApp app(options);
// SkeletalAnimationApp app(options);
// ModelImportApp app(options);
FinalSceneApp app(options);
app.run();
} catch (std::runtime_error& e) {
std::cerr << e.what() << std::endl;
exit(EXIT_FAILURE);
} catch (std::exception& e) {
std::cerr << e.what() << std::endl;
exit(EXIT_FAILURE);
} catch (...) {
std::cerr << "Unknown Error" << std::endl;
exit(EXIT_FAILURE);
}
return 0;
}