Skip to main content

Vulkan best practice when submitting draw commands

As with most projects working in a graphics library, I need to dynamically send draw calls to the command buffers, but what is the best way to do this? Currently, for every frame, I rebuild my command buffers, specify the objects I wish to render, then destroy the command buffer. Am I doing it the right way? I thought there might be a clear command for the buffer but I still need to find it.

One other way I thought I could get it to work is when an object is needed to be displayed/removed, then and only then, I rebuild the command buffer. But again I'm not sure how to handle this properly.

Any help is really appreciated.

0xen
  • 463
  • 2
  • 8
  • 27