From ea275f669690f9124bd1e15b36e50a6caac88060 Mon Sep 17 00:00:00 2001 From: Alexander Overvoorde Date: Tue, 8 Mar 2022 21:41:52 +0100 Subject: [PATCH] Fix code snippet that was not updated as part of #255 --- en/04_Vertex_buffers/01_Vertex_buffer_creation.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/en/04_Vertex_buffers/01_Vertex_buffer_creation.md b/en/04_Vertex_buffers/01_Vertex_buffer_creation.md index fc95b4ff..77122c50 100644 --- a/en/04_Vertex_buffers/01_Vertex_buffer_creation.md +++ b/en/04_Vertex_buffers/01_Vertex_buffer_creation.md @@ -295,16 +295,16 @@ Flushing memory ranges or using a coherent memory heap means that the driver wil ## Binding the vertex buffer All that remains now is binding the vertex buffer during rendering operations. -We're going to extend the `createCommandBuffers` function to do that. +We're going to extend the `recordCommandBuffer` function to do that. ```c++ -vkCmdBindPipeline(commandBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, graphicsPipeline); +vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, graphicsPipeline); VkBuffer vertexBuffers[] = {vertexBuffer}; VkDeviceSize offsets[] = {0}; -vkCmdBindVertexBuffers(commandBuffers[i], 0, 1, vertexBuffers, offsets); +vkCmdBindVertexBuffers(commandBuffer, 0, 1, vertexBuffers, offsets); -vkCmdDraw(commandBuffers[i], static_cast(vertices.size()), 1, 0, 0); +vkCmdDraw(commandBuffer, static_cast(vertices.size()), 1, 0, 0); ``` The `vkCmdBindVertexBuffers` function is used to bind vertex buffers to