Before we can issue drawing commands or dispatch computational work, we need to set up all the required states for the command to be successfully performed. One of the required states is binding a pipeline object to the command buffer--a graphics pipeline if we want to draw objects on screen or a compute pipeline if we want to perform computational work.
Binding a pipeline object
How to do it...
- Take the handle of a command buffer and store it in a variable of type VkCommandBuffer named command_buffer. Make sure the command buffer is in the recording state.
- If a graphics pipeline needs to be bound, make sure the beginning of a render pass has already been recorded in the command_buffer. If a compute pipeline should be bound, make sure no render pass is started or...