Summary

In this chapter, we rendered our first Hello World! program in Vulkan. Drawing it consists of two stages—preparation and rendering (execution). Preparation records the command buffers and the rendering executes them. The command buffers are recorded once and executed multiple times unless there is an explicit change in the pipeline state objects.

The preparation of the command buffer involves recording the Render Pass and graphics pipeline binding and drawing parameters, such as vertex buffers, viewport, scissor, and so on. Finally, the drawing API command is specified; we demonstrated both index- and nonindex-based drawing APIs using the sample application.

The recorded command buffer is executed in the rendering stage. The execution process acquires the swapchain image and submits the command buffer into the graphics queue. Painting is done on the acquired swapchain image. Once this is complete the image is sent to the presentation engine to be displayed on the output display. This chapter also demonstrated API commands for drawing indexed and non-indexed geometries. Towards the end of this chapter, we covered synchronization primitives in Vulkan and you learned how to perform synchronization in between the host and device, and queues and command buffers.

In the next chapter, we will learn about descriptors and the push constant, which allows the sharing of resource contents with the Shader program.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.246.245