-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.cpp
More file actions
44 lines (35 loc) · 887 Bytes
/
app.cpp
File metadata and controls
44 lines (35 loc) · 887 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
38
39
40
41
42
43
44
// Enable SIMD optimizations for glm
#define GLM_FORCE_PURE
#include "src/Window.h"
#include "src/fileformats/las.h"
#include "src/LuaState.h"
#include <iostream>
#include <filesystem>
Window *window;
int main()
{
auto path = std::filesystem::current_path();
// check if path ends with Debug if not append Debug and set as current path
if (path.string().find("Debug") == std::string::npos)
{
path = path / "Debug";
std::filesystem::current_path(path);
}
LuaState();
LuaState::open_libs();
window = new Window();
auto initCode = window->init();
if (initCode != 0)
{
std::cerr << "Failed to initialize window" << std::endl;
return initCode;
}
while (!window->should_close())
{
window->update();
window->render();
}
delete window;
LuaState::close();
return 0;
}