Заменил вектор на массив
This commit is contained in:
parent
1aee70ecd8
commit
7dfc77b5dc
|
@ -579,7 +579,7 @@ void Vulkan::createGraphicPipeline()
|
||||||
bindingDescription.inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
|
bindingDescription.inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
|
||||||
|
|
||||||
// Описание атрибута
|
// Описание атрибута
|
||||||
std::vector<VkVertexInputAttributeDescription> attributeDescriptions(2);
|
VkVertexInputAttributeDescription attributeDescriptions[2];
|
||||||
|
|
||||||
attributeDescriptions[0].binding = 0;
|
attributeDescriptions[0].binding = 0;
|
||||||
attributeDescriptions[0].location = 0;
|
attributeDescriptions[0].location = 0;
|
||||||
|
@ -592,9 +592,9 @@ void Vulkan::createGraphicPipeline()
|
||||||
attributeDescriptions[1].offset = offsetof(Vertex, color);
|
attributeDescriptions[1].offset = offsetof(Vertex, color);
|
||||||
|
|
||||||
vertexInputInfo.vertexBindingDescriptionCount = 1;
|
vertexInputInfo.vertexBindingDescriptionCount = 1;
|
||||||
vertexInputInfo.vertexAttributeDescriptionCount = static_cast<uint32_t>(attributeDescriptions.size());
|
vertexInputInfo.vertexAttributeDescriptionCount = sizeof(attributeDescriptions);
|
||||||
vertexInputInfo.pVertexBindingDescriptions = &bindingDescription;
|
vertexInputInfo.pVertexBindingDescriptions = &bindingDescription;
|
||||||
vertexInputInfo.pVertexAttributeDescriptions = attributeDescriptions.data();
|
vertexInputInfo.pVertexAttributeDescriptions = attributeDescriptions;
|
||||||
|
|
||||||
// Входной сборщик
|
// Входной сборщик
|
||||||
VkPipelineInputAssemblyStateCreateInfo inputAssembly{};
|
VkPipelineInputAssemblyStateCreateInfo inputAssembly{};
|
||||||
|
|
Loading…
Reference in New Issue