feature/imgui-sdl
points-test
Last change
on this file since b6e60b4 was 5edbd58, checked in by Dmitry Portnoy <dmitry.portnoy@…>, 5 years ago |
For both openglgame and vulkangame, pass in the window width and height and a fullscreen flag to the run() function
|
-
Property mode
set to
100644
|
File size:
701 bytes
|
Rev | Line | |
---|
[d02c25f] | 1 | #include "opengl-game.hpp"
|
---|
| 2 |
|
---|
| 3 | #include <iostream>
|
---|
| 4 |
|
---|
[5edbd58] | 5 | #include "consts.hpp"
|
---|
[76d19a8] | 6 | #include "crash-logger.hpp"
|
---|
| 7 |
|
---|
[d02c25f] | 8 | using namespace std;
|
---|
| 9 |
|
---|
[76d19a8] | 10 | int __main(int argc, char* argv[]);
|
---|
| 11 |
|
---|
[d02c25f] | 12 | int main(int argc, char* argv[]) {
|
---|
[76d19a8] | 13 | CrashLogger logger(__main, argc, argv);
|
---|
| 14 |
|
---|
| 15 | exit(0);
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | int __main(int argc, char* argv[]) {
|
---|
[d02c25f] | 19 |
|
---|
| 20 | #ifdef NDEBUG
|
---|
| 21 | cout << "DEBUGGING IS OFF" << endl;
|
---|
| 22 | #else
|
---|
| 23 | cout << "DEBUGGING IS ON" << endl;
|
---|
| 24 | #endif
|
---|
| 25 |
|
---|
| 26 | cout << "Starting OpenGL Game..." << endl;
|
---|
| 27 |
|
---|
| 28 | OpenGLGame game;
|
---|
| 29 |
|
---|
| 30 | try {
|
---|
[5edbd58] | 31 | game.run(640, 480, GUI_FLAGS_WINDOW_FULLSCREEN);
|
---|
[d02c25f] | 32 | } catch (const exception& e) {
|
---|
| 33 | cerr << e.what() << endl;
|
---|
| 34 | return EXIT_FAILURE;
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | cout << "Finished running the game" << endl;
|
---|
| 38 |
|
---|
| 39 | return EXIT_SUCCESS;
|
---|
| 40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.