I want to perform the vertex buffer update. I'm starting from empty buffer and I will add new points. The amount of added points is not frame-dependent. It can by one per frame, few or none.
In OpenGL I just allocated memory for all points which will be added (constant max size), use the glBufferSubData and modify the number of points which will be rendered (so only part of the buffer will be visible).
In Vulkan - I suppose I will need to use createBuffer with constant max size but what about modifications? I didn't found the "dedicated" approach for it. I think about sth like:
void* data;
vkMapMemory(src, data);
memcpy(data, modifiedInput);
vkUnmapMemory(src);
VkBufferCopy copyParams = {};
copyRegion.srcOffset = currOffset;//starting from last point in buffer
copyRegion.dstOffset = copyRegion.srcOffset;
copyRegion.size = size;
vkCmdCopyBuffer(src, dest, copyParams);
currOffset += size;
I'm not sure it's the correct way. Do I need to recreate the command buffers in this case or I should use totally different approach?