diff --git a/libxiv b/libxiv index f883585..f674fbe 160000 --- a/libxiv +++ b/libxiv @@ -1 +1 @@ -Subproject commit f8835854a3656f6212d647e7c7ce7c0c50c698b7 +Subproject commit f674fbe75bad269c6a00d9e4e5262df285b05152 diff --git a/renderer/src/renderer.cpp b/renderer/src/renderer.cpp index cb97a31..1ea7e9d 100644 --- a/renderer/src/renderer.cpp +++ b/renderer/src/renderer.cpp @@ -572,12 +572,14 @@ void Renderer::initPipeline() { normalAttribute.location = 1; normalAttribute.offset = offsetof(Vertex, normal); + std::array attributes = {positionAttribute, normalAttribute}; + VkPipelineVertexInputStateCreateInfo vertexInputState = {}; vertexInputState.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; vertexInputState.vertexBindingDescriptionCount = 1; vertexInputState.pVertexBindingDescriptions = &binding; - vertexInputState.vertexAttributeDescriptionCount = 1; - vertexInputState.pVertexAttributeDescriptions = &positionAttribute; + vertexInputState.vertexAttributeDescriptionCount = attributes.size(); + vertexInputState.pVertexAttributeDescriptions = attributes.data(); VkPipelineInputAssemblyStateCreateInfo inputAssembly = {}; inputAssembly.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO;