-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
36 lines (29 loc) · 717 Bytes
/
Copy pathmain.cpp
File metadata and controls
36 lines (29 loc) · 717 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
#include "Window.h"
#include <nfd.hpp>
#include <cstdlib>
#include <iostream>
int main()
{
glfwSetErrorCallback([](int error_code, const char* description)
{
std::cerr << "[glfw] E(" << error_code << "): " << description << std::endl;
});
if (glfwInit() != GLFW_TRUE)
{
std::cerr << "[glfw] E: Could not be initialized." << std::endl;
std::exit(EXIT_FAILURE);
}
else if (NFD::Init() != NFD_OKAY)
{
std::cerr << "[NFD] E: Could not be initialized." << std::endl;
std::exit(EXIT_FAILURE);
}
else
{
Window window = Window();
window.Init();
window.MainLoop();
}
NFD::Quit();
glfwTerminate();
}