Hubris Engine Dev
A Project to learn and get into Game Engine developement.
 
Loading...
Searching...
No Matches
vkPipeline.cpp
Go to the documentation of this file.
2
4{
5 static const std::vector<VkDynamicState> dynamicStates = {
6 VK_DYNAMIC_STATE_VIEWPORT,
7 VK_DYNAMIC_STATE_SCISSOR};
8
9 VkPipelineDynamicStateCreateInfo dynamicState{};
10 dynamicState.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO;
11 dynamicState.dynamicStateCount = static_cast<uint32_t>(dynamicStates.size());
12 dynamicState.pDynamicStates = dynamicStates.data();
13
14 VkPipelineVertexInputStateCreateInfo vertexInputInfo{};
15 vertexInputInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO;
16 vertexInputInfo.vertexBindingDescriptionCount = 0;
17 vertexInputInfo.pVertexBindingDescriptions = nullptr; // Optional
18 vertexInputInfo.vertexAttributeDescriptionCount = 0;
19 vertexInputInfo.pVertexAttributeDescriptions = nullptr; // Optional
20
21 VkPipelineInputAssemblyStateCreateInfo inputAssembly{};
22 inputAssembly.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO;
23 inputAssembly.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
24 inputAssembly.primitiveRestartEnable = VK_FALSE;
25}
vkPipeline(const PipelineDescriptor &desc)
Definition vkPipeline.cpp:3