Descriptors, gathered into sets, are allocated from descriptor pools. When we create a pool, we must define which descriptors, and how many of them, can be allocated from the created pool.
Creating a descriptor pool
How to do it...
- Take the handle of a logical device on which the descriptor pool should be created. Store it in a variable of type VkDevice named logical_device.
- Create a vector variable named descriptor_types with elements of type VkDescriptorPoolSize. For each type of descriptor that will be allocated from the pool, add a new element to the descriptor_types variable defining the specified type of descriptor and the number of descriptors of a given type that will be allocated from the pool.
- Create a variable of type VkDescriptorPoolCreateInfo named...