Skip to content

LiteFX::Rendering::GlobalDescriptorHeaps::allocate

Allocates descriptors from heap.

Synopsis

Declared in <litefx/rendering_api.hpp>

[[dllimport, nodiscard, dllexport]] DescriptorHeapAllocation allocate(
    DescriptorHeapType heap,
    UInt32 descriptors);

Exceptions

NameThrown on
ArgumentOutOfRangeExceptionThrown if descriptors is 0.
RuntimeExceptionThrown if the descriptor heap is out of space.

Return Value

The allocation for the descriptors.

Note

The return value should not be discarded.

Parameters

NameDescription
heapThe heap to allocate from.
descriptorsThe number of descriptors to allocate from heap.