-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
37 lines (34 loc) · 762 Bytes
/
main.cpp
File metadata and controls
37 lines (34 loc) · 762 Bytes
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
#include "Application.hpp"
#include "Log.hpp"
#include "vulkan/vulkan.hpp"
#include <SDL2/SDL.h>
// #define DEBUG
int main(int argc, char** argv)
{
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) != 0)
{
LogError(fmt::format("Error initializing sdl: {}", SDL_GetError()));
}
try
{
Application app;
app.Run();
}
catch (vk::SystemError& e) // taken from VulkanSamples
{
LogError(fmt::format("Vulkan Error: {}\n", e.what()));
exit(-1);
}
catch (std::exception& e)
{
LogError(fmt::format("std::exception: {}\n", e.what()));
exit(-1);
}
catch (...)
{
LogError(fmt::format("Unknown Error"));
exit(-1);
}
SDL_Quit();
return 0;
}