-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSource.cpp
More file actions
41 lines (37 loc) · 851 Bytes
/
Source.cpp
File metadata and controls
41 lines (37 loc) · 851 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
#include "Pipeline.h"
#include "Allocator.h"
#include "Util.h"
#include "Renderer.h"
#include "vmath.h"
#include "Model.h"
struct App : Renderer
{
App() :
Renderer(800, 600, 1, 8, { { .shader = "shader1", .depth = 1, .cull = 1 },
{ .shader = "anim", .depth = 1, .cull = 1 }})
{
InitImgui();
}
int Run()
{
current_scene->mesh.emplace_back(Mesh::Create("models\\batman\\0.obj"));
current_scene->mesh.emplace_back(Mesh::Create("models\\doom\\0.obj"));
current_scene->mesh.emplace_back(Mesh::Create("models\\sponza\\sponza.obj"));
current_scene->mesh[0].xform.pos.x += 2;
current_scene->mesh[2].xform.sca = vec4(0.01, 0.01, 0.01, 1);
current_scene->roughness = 144;
while (PollWindows())
{
BeginFrame();
RenderScene();
EndFrame();
}
return 1;
}
};
int main()
{
srand(time(0));
InitVulkan();
App().Run();
}