Understanding the concept of descriptors
A descriptor consists of descriptor set objects. These objects contain storage for a set of descriptors. A descriptor set connects a given resource—such as a uniform buffer, sampled image, stored image, and so on—to the shader helping it read and interpret the incoming resource data through the layout bindings defined using the descriptor set layout. For example, resources such as image textures, sampler and buffers are bound to the shader using descriptors.
Descriptors are opaque objects and define a protocol to communicate with the shaders; behind the curtain, it provides a silent mechanism to associate the resource memory with the shaders with the help of location binding.
VulkanDescriptor - a user-defined descriptor class
In this chapter, we will introduce a new user class called VulkanDescriptor
and keep our descriptor-related member variable and function here. This will be helpful in keeping the descriptor code separate from the...