Unlike OpenGL, where we had uniform buffers to pass in the model, view, projection, and other kinds of data, Vulkan has descriptors. In descriptors, we have to first specify the layout of the buffer, as well as the binding location, count, type of descriptor, and the shader stage it is associated with.
Once the descriptor layout is created with the different types of descriptors, we have to create a descriptor pool for the number-swapchain image count because the uniform buffer will be set for each time per frame.
After that, we can allocate and populate the descriptor sets for both the frames. The allocation of data will be done from the pool.
We will create a new class for creating the descriptor set, layout binding, pool, and allocating and populating the descriptor sets. Create a new class called Descriptor. In the Descriptor.h file, add the following...