LiteFX::Rendering::IGraphicsFactory::tryCreateBuffer¶
Tries to create a buffer that can be bound to a descriptor of a specific descriptor set.
Synopsis¶
Declared in <litefx/rendering_api.hpp>
[[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;
Return Value¶
true, if the buffer was created successfully and false otherwise.
Parameters¶
| Name | Description |
|---|---|
| buffer | The instance of the buffer, or nullptr, if the buffer could not be allocated. |
| pipeline | The pipeline that provides the descriptor set. |
| space | The space, the descriptor set is bound to. |
| binding | The binding point of the descriptor within the parent descriptor set. |
| heap | The heap to allocate the buffer on. |
| elements | The number of elements in the buffer (in case the buffer is an array). |
| usage | The intended usage for the buffer. |
| allocationBehavior | The behavior controlling what happens if currently there is not enough memory available for the resource. |
| elementSize | A type for an unsigned 32 bit integer. |