Skip to content

LiteFX::Rendering::DescriptorBinding::constantBuffer

Creates a descriptor binding for a constant/uniform buffer.

Synopsis

Declared in <litefx/rendering_api.hpp>

[[dllimport, nodiscard, dllexport]] constexpr static DescriptorBinding constantBuffer(
    IBuffer const& buffer,
    UInt32 element = 0,
    UInt32 elements = 1) noexcept;

Description

For constant/uniform buffers, each element must be bound to their own descriptor. Arrays are expressed as descriptor arrays.

Return Value

The descriptor binding.

Note

The return value should not be discarded.

Parameters

NameDescription
bufferThe buffer to bind.
elementThe element to bind.
elementsThe number of elements to bind. Equals the number of descriptors to bind.