Minor code cleanup
This commit is contained in:
parent
b64c31357f
commit
384b2031a2
8 changed files with 41 additions and 60 deletions
|
|
@ -3,11 +3,9 @@
|
|||
*
|
||||
* Don't take this a an example, it's more of a personal playground
|
||||
*
|
||||
* Copyright (C) 2016 by Sascha Willems - www.saschawillems.de
|
||||
* Copyright (C) 2016-2023 by Sascha Willems - www.saschawillems.de
|
||||
*
|
||||
* Note : Different license than the other examples!
|
||||
*
|
||||
* This code is licensed under the Mozilla Public License Version 2.0 (http://opensource.org/licenses/MPL-2.0)
|
||||
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
||||
*/
|
||||
|
||||
#include "vulkanexamplebase.h"
|
||||
|
|
@ -157,10 +155,7 @@ public:
|
|||
};
|
||||
|
||||
VkDescriptorPoolCreateInfo descriptorPoolInfo =
|
||||
vks::initializers::descriptorPoolCreateInfo(
|
||||
poolSizes.size(),
|
||||
poolSizes.data(),
|
||||
2);
|
||||
vks::initializers::descriptorPoolCreateInfo(poolSizes, 2);
|
||||
|
||||
VK_CHECK_RESULT(vkCreateDescriptorPool(device, &descriptorPoolInfo, nullptr, &descriptorPool));
|
||||
}
|
||||
|
|
@ -182,9 +177,7 @@ public:
|
|||
};
|
||||
|
||||
VkDescriptorSetLayoutCreateInfo descriptorLayout =
|
||||
vks::initializers::descriptorSetLayoutCreateInfo(
|
||||
setLayoutBindings.data(),
|
||||
setLayoutBindings.size());
|
||||
vks::initializers::descriptorSetLayoutCreateInfo(setLayoutBindings);
|
||||
|
||||
VK_CHECK_RESULT(vkCreateDescriptorSetLayout(device, &descriptorLayout, nullptr, &descriptorSetLayout));
|
||||
|
||||
|
|
@ -229,7 +222,7 @@ public:
|
|||
&texDescriptorCubeMap)
|
||||
};
|
||||
|
||||
vkUpdateDescriptorSets(device, writeDescriptorSets.size(), writeDescriptorSets.data(), 0, NULL);
|
||||
vkUpdateDescriptorSets(device, static_cast<uint32_t>(writeDescriptorSets.size()), writeDescriptorSets.data(), 0, nullptr);
|
||||
}
|
||||
|
||||
void preparePipelines()
|
||||
|
|
@ -252,7 +245,7 @@ public:
|
|||
pipelineCI.pViewportState = &viewportState;
|
||||
pipelineCI.pDepthStencilState = &depthStencilState;
|
||||
pipelineCI.pDynamicState = &dynamicState;
|
||||
pipelineCI.stageCount = shaderStages.size();
|
||||
pipelineCI.stageCount = static_cast<uint32_t>(shaderStages.size());
|
||||
pipelineCI.pStages = shaderStages.data();
|
||||
pipelineCI.pVertexInputState = vkglTF::Vertex::getPipelineVertexInputState({ vkglTF::VertexComponent::Position, vkglTF::VertexComponent::Normal, vkglTF::VertexComponent::UV, vkglTF::VertexComponent::Color });;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue