Preparing the drawing object

The preparation of the drawing object is implemented in the prepare() function; this function has already been covered in Chapter 7, Buffer Resource, Render Pass, Framebuffer, and Shaders with SPIR-V. For more information, please refer to the subsection Setting the background color in Render Pass instance under Clearing the background color.

Recording Render Pass commands

The Render Pass instance records the command's single subpass at a time. A Render Pass may contain one or more subpasses. For each subpass, the commands are recorded using the vkCmdBeginRenderPass() and vkCmdEndRenderPass() APIs. These two APIs together define a scope under which iterating through different subpasses will record the commands for that ...

Get Learning Vulkan now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.