feature/imgui-sdl
Last change
on this file since 3b7d497 was 3b7d497, checked in by Dmitry Portnoy <dportnoy@…>, 4 years ago |
Start implementing an ImGUI ui on top of SDL and Vulkan using some example code
|
-
Property mode
set to
100644
|
File size:
792 bytes
|
Rev | Line | |
---|
[e8ebc76] | 1 | #include <iostream>
|
---|
| 2 |
|
---|
[5edbd58] | 3 | #include "consts.hpp"
|
---|
[76d19a8] | 4 | #include "crash-logger.hpp"
|
---|
| 5 |
|
---|
[3b7d497] | 6 | //#include "vulkan-game.hpp"
|
---|
| 7 | #include "sdl-game.hpp"
|
---|
[aa7707d] | 8 |
|
---|
[e8ebc76] | 9 | using namespace std;
|
---|
| 10 |
|
---|
[76d19a8] | 11 | int __main(int argc, char* argv[]);
|
---|
| 12 |
|
---|
[e8ebc76] | 13 | int main(int argc, char* argv[]) {
|
---|
[4994692] | 14 | // TODO: Add date & time to the crash log
|
---|
[76d19a8] | 15 | CrashLogger logger(__main, argc, argv);
|
---|
| 16 |
|
---|
| 17 | exit(0);
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | int __main(int argc, char* argv[]) {
|
---|
[34bdf3a] | 21 | const int MAX_FRAMES_IN_FLIGHT = 2;
|
---|
| 22 |
|
---|
[99d44b2] | 23 | cout << "Starting Vulkan Game..." << endl;
|
---|
[e8ebc76] | 24 |
|
---|
[34bdf3a] | 25 | VulkanGame game(MAX_FRAMES_IN_FLIGHT);
|
---|
[e8ebc76] | 26 |
|
---|
| 27 | try {
|
---|
[3b7d497] | 28 | //game.run(800, 600, 0);
|
---|
| 29 | //game.run(800, 600, GUI_FLAGS_WINDOW_FULLSCREEN);
|
---|
| 30 | game.run(1280, 720, 0);
|
---|
[e8ebc76] | 31 | } catch (const exception& e) {
|
---|
| 32 | cerr << e.what() << endl;
|
---|
| 33 | return EXIT_FAILURE;
|
---|
| 34 | }
|
---|
| 35 |
|
---|
| 36 | cout << "Finished running the game" << endl;
|
---|
| 37 |
|
---|
| 38 | return EXIT_SUCCESS;
|
---|
[4994692] | 39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.