Hello everybody, so for me Command Buffers and Command Pools are a bit unclear. And I want to ask couple questions about it.
-
Is it possible to rerecord command buffer after it was recorded? For instance, I want to change my command buffer that i could draw one more object within my command buffer. Is it possible to archieve without removing/readding command buffer into command pool?
-
Is it better to have one big command buffer in which i would draw all my objects. Or should i have one per pipeline?
- Yes, there are 2 main methods of resetting a command buffer.
First is resetting the pool. This will reset all command buffers allocated from the pool and is only valid if no command buffer of it is in use.
The other option is resetting just the command buffer. This requires that the pool is created with VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT. This can cause fragmentation of the pool and eventual reduced performance; prefer resetting the entire pool.
After either of these operations you can rerecord the command buffers.