-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
45 lines (33 loc) · 945 Bytes
/
main.cpp
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
45
#include "shaders/LinearMath.h"
#include "core/UI.h"
#include "core/Backend.h"
#include "core/OptixRenderer.h"
#include "core/BufferManager.h"
#include "util/TextureUtils.h"
#include "voxelengine.h"
int main(int argc, char* argv[])
{
auto& backend = jazzfusion::Backend::Get();
auto& renderer = jazzfusion::OptixRenderer::Get();
try
{
auto& ui = jazzfusion::UI::Get();
auto& bufferManager = jazzfusion::BufferManager::Get();
auto& textureManager = jazzfusion::TextureManager::Get();
auto& voxelengine = vox::VoxelEngine::Get();
voxelengine.init();
backend.init();
bufferManager.init();
textureManager.init();
renderer.init();
ui.init();
backend.mainloop(vox::UpdateFunc);
}
catch (const std::exception& e)
{
std::cerr << e.what() << std::endl;
}
renderer.clear();
backend.clear();
return 0;
}