-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.hpp
47 lines (36 loc) · 1.09 KB
/
app.hpp
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
46
47
#pragma once
#include "lve_device.hpp"
#include "lve_model.hpp"
#include "lve_pipeline.hpp"
#include "lve_swap_chain.hpp"
#include "lve_window.hpp"
//std
#include <memory>
#include <vector>
namespace lve {
class App {
public:
//Window consts
static constexpr int WIDTH = 800;
static constexpr int HEIGHT = 600;
App();
~App();
//prohibit copying and initliasing with instance
App(const App &) = delete;
App &operator=(const App &) = delete;
void run();
private:
void loadModels();
void createPipelineLayout();
void createPipeline();
void createCommandBuffers();
void drawFrame();
LveWindow lveWindow{WIDTH, HEIGHT, "App"};
LveDevice lveDevice{lveWindow};
LveSwapChain lveSwapChain{lveDevice, lveWindow.getExtent()};
std::unique_ptr<LvePipeline> lvePipeline;
VkPipelineLayout pipelineLayout;
std::vector<VkCommandBuffer> commandBuffers;
std::unique_ptr<LveModel> lveModel;
};
} // namespace lve