-
Notifications
You must be signed in to change notification settings - Fork 0
/
first_app.hpp
37 lines (30 loc) · 850 Bytes
/
first_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
#pragma once
#include "picov_window.hpp"
#include "picov_pipeline.hpp"
#include "picov_device.hpp"
#include "picov_swap_chain.hpp"
#include <memory>
#include <vector>
namespace picov {
class FirstApp {
public:
static constexpr int WIDTH = 800;
static constexpr int HEIGHT = 600;
FirstApp();
~FirstApp();
FirstApp(const FirstApp&) = delete;
FirstApp& operator=(const FirstApp&) = delete;
void run();
private:
void createPipelineLayout();
void createPipeline();
void createCommandBuffers();
void drawFrame();
PicovWindow picovWindow{ WIDTH, HEIGHT, "Hello Vulkan!" };
PicovDevice picovDevice{ picovWindow };
PicovSwapChain picovSwapChain{ picovDevice, picovWindow.getExtent() };
std::unique_ptr<PicovPipeline> picovPipeline;
VkPipelineLayout pipelineLayout;
std::vector<VkCommandBuffer> commandBuffers;
};
}