Skip to content

LiteFX::Rendering::GraphicsFactory::tryCreateBuffer

tryCreateBuffer overloads

Synopses

Declared in <litefx/rendering.hpp>

Tries to create a buffer of type type.

[[dllimport, dllexport]] bool tryCreateBuffer(
    SharedPtr<IBuffer>& buffer,
    BufferType type,
    ResourceHeap heap,
    size_t elementSize,
    UInt32 elements = 1,
    ResourceUsage usage = ResourceUsage::Default,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const;

» more...

Tries to create a buffer that can be bound to a specific descriptor.

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

» more...

Tries to create a buffer of type type.

virtual bool tryCreateBuffer(
    SharedPtr<TBuffer>& buffer,
    BufferType type,
    ResourceHeap heap,
    size_t elementSize,
    UInt32 elements = 1,
    ResourceUsage usage = ResourceUsage::Default,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const = 0;

» more...

Tries to create a buffer that can be bound to a specific descriptor.

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

» more...

Tries to create a buffer that can be bound to a descriptor of a specific descriptor set.

[[dllimport, dllexport]] bool tryCreateBuffer(
    SharedPtr<IBuffer>& buffer,
    IPipeline const& pipeline,
    UInt32 space,
    UInt32 binding,
    ResourceHeap heap,
    UInt32 elements = 1,
    ResourceUsage usage = ResourceUsage::Default,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const;

» more...

Tries to create a buffer of type type.

[[dllimport, dllexport]] bool tryCreateBuffer(
    SharedPtr<IBuffer>& buffer,
    String const& name,
    BufferType type,
    ResourceHeap heap,
    size_t elementSize,
    UInt32 elements,
    ResourceUsage usage = ResourceUsage::Default,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const;

» more...

Tries to create a buffer that can be bound to a specific descriptor.

[[dllimport, dllexport]] bool tryCreateBuffer(
    SharedPtr<IBuffer>& buffer,
    String const& name,
    IDescriptorSetLayout const& descriptorSet,
    UInt32 binding,
    ResourceHeap heap,
    UInt32 elements = 1,
    ResourceUsage usage = ResourceUsage::Default,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const;

» more...

Tries to create a buffer of type type.

virtual bool tryCreateBuffer(
    SharedPtr<TBuffer>& buffer,
    String const& name,
    BufferType type,
    ResourceHeap heap,
    size_t elementSize,
    UInt32 elements = 1,
    ResourceUsage usage = ResourceUsage::Default,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const = 0;

» more...

Tries to create a buffer that can be bound to a descriptor of a specific descriptor set.

[[dllimport, dllexport]] bool tryCreateBuffer(
    SharedPtr<IBuffer>& buffer,
    IPipeline const& pipeline,
    UInt32 space,
    UInt32 binding,
    ResourceHeap heap,
    UInt32 elementSize,
    UInt32 elements,
    ResourceUsage usage = ResourceUsage::Default,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const;

» more...

Tries to create a buffer that can be bound to a specific descriptor.

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

» more...

Tries to create a buffer that can be bound to a descriptor of a specific descriptor set.

[[dllimport, dllexport]] bool tryCreateBuffer(
    SharedPtr<IBuffer>& buffer,
    String const& name,
    IPipeline const& pipeline,
    UInt32 space,
    UInt32 binding,
    ResourceHeap heap,
    UInt32 elements = 1,
    ResourceUsage usage = ResourceUsage::Default,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const;

» more...

Tries to create a buffer that can be bound to a descriptor of a specific descriptor set.

[[dllimport, dllexport]] bool tryCreateBuffer(
    SharedPtr<IBuffer>& buffer,
    String const& name,
    IPipeline const& pipeline,
    UInt32 space,
    UInt32 binding,
    ResourceHeap heap,
    size_t elementSize,
    UInt32 elements = 1,
    ResourceUsage usage = ResourceUsage::Default,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const;

» more...

Return Value

true, if the buffer was created successfully and false otherwise.

Parameters

NameDescription
bufferThe instance of the buffer, or nullptr, if the buffer could not be allocated.
typeThe type of the buffer.
heapThe heap to allocate the buffer on.
elementSizeThe size of an element in the buffer (in bytes).
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.
descriptorSetThe layout of the descriptors parent descriptor set.
bindingThe binding point of the descriptor within the parent descriptor set.
pipelineThe pipeline that provides the descriptor set.
spaceThe space, the descriptor set is bound to.
nameThe name of the buffer.