When we draw a geometry, we need to specify data for vertices. At the very least, vertex positions are required, but we can specify other attributes such as normal, tangent or bitangent vectors, colors, or texture coordinates. This data comes from buffers created with a vertex buffer usage. We need to bind these buffers to specified bindings before we can issue drawing commands.
Binding vertex buffers
Getting ready
In this recipe, a custom VertexBufferParameters type is introduced. It has the following definition:
struct VertexBufferParameters { VkBuffer Buffer; VkDeviceSize MemoryOffset; };
This type is used to specify the buffer's parameters: its handle (in the Buffer member) and an offset from the start of the buffer's memory from which...