Now we have all the knowledge required to draw images using the Vulkan API. In this sample recipe, we will aggregate some of the previous recipes and see how to use them to record a command buffer that displays a geometry.
Recording a command buffer that draws a geometry with dynamic viewport and scissor states
Getting ready
To draw a geometry, we will use a custom structure type that has the following definition:
struct Mesh { std::vector<float> Data; std::vector<uint32_t> VertexOffset; std::vector<uint32_t> VertexCount; };
The Data member contains values for all the attributes of a given vertex, one vertex after another. For example, there are three components of position attribute, three components of a normal vector and two texture...