Skip to content

LiteFX::Rendering::DescriptorBinding::structuredBuffer

Creates a descriptor binding for a structured buffer.

Synopsis

Declared in <litefx/rendering_api.hpp>

[[dllimport, nodiscard, dllexport]] constexpr static DescriptorBinding structuredBuffer(
    IBuffer const& buffer,
    UInt32 firstElement = 0,
    UInt32 elements = 0,
    UInt32 elementsPerDescriptor = 1,
    UInt32 stride = 0) noexcept;

Return Value

The descriptor binding.

Note

The return value should not be discarded.

Parameters

NameDescription
bufferThe buffer to bind.
firstElementThe first element at which binding starts.
elementsThe number of elements in the buffer to bind.
elementsPerDescriptorThe number of elements to bind to a single descriptor.
strideThe stride between individual element offsets in a structured buffer on the GPU.