-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
38 lines (23 loc) · 833 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
#pragma once
#include "Renderer/VkEngine.h"
int main() {
VulkanEngine engine;
///VulkanEngine doenst handle this anymore.
glfwInit();
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
auto window = glfwCreateWindow(800, 600, "Atomus 0.0.1", nullptr, nullptr);
engine.Init(window, true);
//load test model
std::string structurePath = {"..//..//Assets/structure_mat.glb"};
auto structureFile = VkLoader::loadGltf(&engine, structurePath);
assert(structureFile.has_value());
engine.loadedScenes["structure"] = *structureFile;
while (!glfwWindowShouldClose(window)) {
glfwPollEvents();
engine.updateScene();
engine.loadedScenes["structure"]->Draw(glm::mat4{1.f}, engine.mainDrawContext);
engine.Run();
}
engine.CleanUp();
return 0;
}