![]() |
Vireo
0.0
Vireo 3D Rendering Hardware Interface
|
A descriptor layout is a collection describing the content of a descriptor set. Each resource is specified by his binding number, a resources type and a number of element.
There is three types of layouts :
The samplers and dynamic uniform types of layouts exists for the sole reason of portability across graphics API.
A descriptor layout can be used to create multiple descriptor sets and for multiple pipelines. For example you can have in your application only one descriptor layout with all the needed samplers for all the pipelines.
Descriptor layouts are created using vireo::Vireo::createDescriptorLayout, vireo::Vireo::createSamplerDescriptorLayout or vireo::Vireo::createDynamicUniformDescriptorLayout.
For generic and samplers layouts add resources descriptions with vireo::DescriptorLayout::add then build the layout with vireo::DescriptorLayout::build. For dynamic uniform layouts the add and build process is done automatically and the uniform buffer is bound to the index 0
.