LiteFX::Rendering::DescriptorSet::bindToHeap¶
bindToHeap overloads
Synopses¶
Declared in <litefx/rendering.hpp>
Binds a sampler directly to a descriptor heap and returns the index that can be used to access it.
[[dllimport, dllexport]] UInt32 bindToHeap(
UInt32 descriptor,
ISampler const& sampler) const;
Binds a sampler directly to a descriptor heap and returns the index that can be used to access it.
virtual UInt32 bindToHeap(
UInt32 descriptor,
sampler_type const& sampler) const = 0;
Binds a resource directly to a descriptor heap and returns the index that can be used to access it.
[[dllimport, dllexport]] UInt32 bindToHeap(
DescriptorType bindingType,
UInt32 descriptor,
IBuffer const& buffer,
UInt32 bufferElement = 0,
UInt32 elements = 0,
Format texelFormat = Format::None) const;
Binds a resource directly to a descriptor heap and returns the index that can be used to access it.
virtual UInt32 bindToHeap(
DescriptorType bindingType,
UInt32 descriptor,
buffer_type const& buffer,
UInt32 bufferElement = 0,
UInt32 elements = 0,
Format texelFormat = Format::None) const = 0;
Binds a resource directly to a descriptor heap and returns the index that can be used to access it.
[[dllimport, dllexport]] UInt32 bindToHeap(
DescriptorType bindingType,
UInt32 descriptor,
IImage const& image,
UInt32 firstLevel = 0,
UInt32 levels = 0,
UInt32 firstLayer = 0,
UInt32 layers = 0) const;
Binds a resource directly to a descriptor heap and returns the index that can be used to access it.
virtual UInt32 bindToHeap(
DescriptorType bindingType,
UInt32 descriptor,
image_type const& image,
UInt32 firstLevel = 0,
UInt32 levels = 0,
UInt32 firstLayer = 0,
UInt32 layers = 0) const = 0;
Exceptions¶
| Name | Thrown on |
|---|---|
RuntimeException | Thrown, if the descriptor set does not contain a descriptor that provides direct heap access to the underlying descriptor heap indicated by bindingType. |
Return Value¶
- The global heap index that can be used to access the sampler from the shader.
- The global heap index that can be used to access the resource from the shader.
Parameters¶
| Name | Description |
|---|---|
| descriptor | The index of the descriptor in the heap to bind sampler to. |
| sampler | The sampler to bind. |
| bindingType | The type of the descriptor used to bind buffer to the heap. |
| buffer | The buffer to bind. |
| bufferElement | The index of an element inside buffer that should be bound. |
| elements | The number of elements from the buffer to bind to the descriptor set. A value of 0 binds all available elements, starting at bufferElement. |
| texelFormat | The format used to read a texel buffer. Required if binding binds a texel buffer and ignored otherwise. |
| image | The image to bind. |
| firstLevel | The index of the first mip-map level to bind. |
| levels | The number of mip-map levels to bind. A value of 0 binds all available levels, starting at firstLevel. |
| firstLayer | The index of the first layer to bind. |
| layers | The number of layers to bind. A value of 0 binds all available layers, starting at firstLayer. |