Update vertex buffer in one frame

I want to use one vertex buffer to draw multiple line strips, the vertex buffer will be updated when the previous line strip has been drawn.
In OpenGL, its code looks like:

glBind(bind vbo and vao);
glBufferData(update vbo);

How to implement this in vulkan?
Thank you!

So… what problem are you having implementing this in Vulkan? Is it the upload of the data? Using the data? Proper synchronization?

Pretty much the same way if you don’t mind it is a naive implementation. vkCmdBindVertexBuffers, vkCmdUpdateBuffer, vkCmdDraw*. Then needs things that Vulkan demands, such as Render Pass, so vkCmdBeginRenderPass containing proper VkSubpassDependenceies. vkCmd* is “only” a recording of commands, so it needs stuff to create the command buffer to record in, and then submit it to actually execute the recordings.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.