-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvkc_pipeline.h
58 lines (47 loc) · 1.21 KB
/
vkc_pipeline.h
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
48
49
50
51
52
53
54
55
56
57
58
#ifndef VKC_PIPELINE_H
#define VKC_PIPELINE_H
#include "stable.h"
#include "vkc_device.h"
#include "vkc_swapchain.h"
/**
* Struct used to define vertex shader input layout and buffer size.
*/
struct VkVertex {
float x, y, z;
float u, v;
float nx, ny, nz;
};
/**
* Class used for the graphics pipeline.
*
* Classes named "Vkc[class]" stand for "Vulkan custom class".
*/
class VkcPipeline
{
// Objects:
public:
VkPipeline handle;
VkPipelineLayout layout;
VkShaderModule vertShader;
VkShaderModule fragShader;
VkDescriptorPool descriptorPool;
VkDescriptorSet descriptorSet;
VkDescriptorSetLayout setLayout;
private:
VkDevice logicalDevice;
// Functions:
public:
VkcPipeline();
VkcPipeline(
const VkcSwapchain *swapchain,
const VkcDevice *device
);
~VkcPipeline();
private:
VkResult createShader(
VkShaderModule &shader,
QString fileName,
const VkcDevice *device
);
};
#endif // VKC_PIPELINE_H