diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-02-16 16:04:32 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-02-16 16:04:32 -0500 |
commit | ed08b673c50b076042d8f0c49501372168142764 (patch) | |
tree | 18ecda99942ef11ce4023c3ad4437976f96b75da /src/main.cpp | |
parent | 224645d1071c14b4829dbb3ae35870868fcff85a (diff) | |
download | therapy-ed08b673c50b076042d8f0c49501372168142764.tar.gz therapy-ed08b673c50b076042d8f0c49501372168142764.tar.bz2 therapy-ed08b673c50b076042d8f0c49501372168142764.zip |
Refactored renderer
Renderer is basically now more C++'y, as it makes more use of classes (a lot of GL types have been wrapped), and the renderer itself is now a class. The monitor mesh is also now indexed. Tweaked the NTSC artifacting after inadvertently fixing a bug with the way the image was loaded.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/main.cpp b/src/main.cpp index d51da7d..ddbc15f 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
@@ -1,27 +1,14 @@ | |||
1 | #include <ctime> | ||
2 | #include <list> | ||
3 | #include <cstdlib> | ||
4 | #include "renderer.h" | ||
5 | #include "muxer.h" | 1 | #include "muxer.h" |
6 | #include "game.h" | 2 | #include "game.h" |
7 | 3 | ||
8 | int main() | 4 | int main() |
9 | { | 5 | { |
10 | srand(time(NULL)); | ||
11 | |||
12 | GLFWwindow* window = initRenderer(); | ||
13 | glfwSwapInterval(1); | ||
14 | |||
15 | initMuxer(); | 6 | initMuxer(); |
16 | 7 | ||
17 | // Put this in a block so game goes out of scope before we destroy the renderer | 8 | Game game; |
18 | { | 9 | game.execute(); |
19 | Game game {window}; | ||
20 | game.execute(); | ||
21 | } | ||
22 | 10 | ||
23 | destroyMuxer(); | 11 | destroyMuxer(); |
24 | destroyRenderer(); | ||
25 | 12 | ||
26 | return 0; | 13 | return 0; |
27 | } | 14 | } |