From 7dfc77b5dc7c69a72580a0ceef7de467f0ad4f5a Mon Sep 17 00:00:00 2001 From: "re.kovalev" Date: Fri, 25 Feb 2022 22:37:05 +0300 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=B2=D0=B5=D0=BA=D1=82=D0=BE=D1=80=20=D0=BD=D0=B0=20=D0=BC?= =?UTF-8?q?=D0=B0=D1=81=D1=81=D0=B8=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vk.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vk.cpp b/src/vk.cpp index 691e140..2cea902 100644 --- a/src/vk.cpp +++ b/src/vk.cpp @@ -579,7 +579,7 @@ void Vulkan::createGraphicPipeline() bindingDescription.inputRate = VK_VERTEX_INPUT_RATE_VERTEX; // Описание атрибута - std::vector attributeDescriptions(2); + VkVertexInputAttributeDescription attributeDescriptions[2]; attributeDescriptions[0].binding = 0; attributeDescriptions[0].location = 0; @@ -592,9 +592,9 @@ void Vulkan::createGraphicPipeline() attributeDescriptions[1].offset = offsetof(Vertex, color); vertexInputInfo.vertexBindingDescriptionCount = 1; - vertexInputInfo.vertexAttributeDescriptionCount = static_cast(attributeDescriptions.size()); + vertexInputInfo.vertexAttributeDescriptionCount = sizeof(attributeDescriptions); vertexInputInfo.pVertexBindingDescriptions = &bindingDescription; - vertexInputInfo.pVertexAttributeDescriptions = attributeDescriptions.data(); + vertexInputInfo.pVertexAttributeDescriptions = attributeDescriptions; // Входной сборщик VkPipelineInputAssemblyStateCreateInfo inputAssembly{};