LiteFX 0.4.1.2025
Computer Graphics Engine
|
Describes a resource binding to a descriptor or descriptor set. More...
#include <rendering_api.hpp>
Public Types | |
using | resource_container = Variant<std::monostate, Ref<const IBuffer>, Ref<const IImage>, Ref<const ISampler>, Ref<const IAccelerationStructure>> |
Public Attributes | |
Optional< UInt32 > | binding = std::nullopt |
The binding point to bind the resource at. If not provided (i.e., std::nullopt ), the index within the collection of DescriptorBindings is used. | |
resource_container | resource = {} |
The resource to bind or std::monostate if no resource should be bound. | |
UInt32 | firstDescriptor = 0 |
The index of the descriptor in a descriptor array at which binding the resource arrays starts. | |
UInt32 | firstElement = 0 |
The index of the first array element or image layer to bind, starting at firstDescriptor. | |
UInt32 | elements = 0 |
The number of array elements or image layers to bind, starting at firstDescriptor. | |
UInt32 | firstLevel = 0 |
If the resource is an image, this describes the first level to be bound. | |
UInt32 | levels = 0 |
If the resource is an image, this describes the number of levels to be bound. | |
Describes a resource binding to a descriptor or descriptor set.
using LiteFX::Rendering::DescriptorBinding::resource_container = Variant<std::monostate, Ref<const IBuffer>, Ref<const IImage>, Ref<const ISampler>, Ref<const IAccelerationStructure>> |
The binding point to bind the resource at. If not provided (i.e., std::nullopt
), the index within the collection of DescriptorBindings
is used.
UInt32 LiteFX::Rendering::DescriptorBinding::elements = 0 |
The number of array elements or image layers to bind, starting at firstDescriptor.
This property is ignored, if the resource is a ISampler.
UInt32 LiteFX::Rendering::DescriptorBinding::firstDescriptor = 0 |
The index of the descriptor in a descriptor array at which binding the resource arrays starts.
If the resource contains an array, the individual elements (layers for images) will be bound, starting at this descriptor. The first element/layer to be bound is identified by firstElement. The number of elements/layers to be bound is stored in elements.
UInt32 LiteFX::Rendering::DescriptorBinding::firstElement = 0 |
The index of the first array element or image layer to bind, starting at firstDescriptor.
This property is ignored, if the resource is a ISampler.
UInt32 LiteFX::Rendering::DescriptorBinding::firstLevel = 0 |
UInt32 LiteFX::Rendering::DescriptorBinding::levels = 0 |
resource_container LiteFX::Rendering::DescriptorBinding::resource = {} |
The resource to bind or std::monostate
if no resource should be bound.
Note that not providing any resource does not perform any binding, in which case a resource needs to be manually bound to the descriptor set later (IDescriptorSet::update). This is useful in situations where you frequently update the resource bound to a descriptor set or where you do no have access to the resource at the time the descriptor set is allocated.