Skip to content

LiteFX::Rendering::IGraphicsFactory::createBuffer

Creates a buffer that can be bound to a specific descriptor.

Synopsis

Declared in <litefx/rendering_api.hpp>

[[dllimport, dllexport]] SharedPtr<IBuffer> createBuffer(
    IDescriptorSetLayout const& descriptorSet,
    UInt32 binding,
    ResourceHeap heap,
    UInt32 elementSize,
    UInt32 elements,
    ResourceUsage usage = ResourceUsage::Default,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const;

Return Value

The instance of the buffer.

Parameters

NameDescription
descriptorSetThe layout of the descriptors parent descriptor set.
bindingThe binding point of the descriptor within the parent descriptor set.
heapThe heap to allocate the buffer on.
elementsThe number of elements in the buffer (in case the buffer is an array).
usageThe intended usage for the buffer.
allocationBehaviorThe behavior controlling what happens if currently there is not enough memory available for the resource.
elementSizeA type for an unsigned 32 bit integer.