LiteFX::Rendering::Backends::VulkanGraphicsFactory::tryCreateIndexBuffer¶
Tries to create an index buffer, based on the layout.
Synopsis¶
Declared in <litefx/backends/vulkan.hpp>
[[dllimport, dllexport]] virtual bool tryCreateIndexBuffer(
SharedPtr<IVulkanIndexBuffer>& buffer,
VulkanIndexBufferLayout const& layout,
ResourceHeap heap,
UInt32 elements,
ResourceUsage usage = ResourceUsage::Default,
AllocationBehavior allocationBehavior = AllocationBehavior::Default) const override;
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. |
| layout | The layout of the index buffer. |
| heap | The heap to allocate the buffer on. |
| elements | The number of elements within the vertex buffer (i.e. the number of indices). |
| usage | The intended usage for the buffer. |
| allocationBehavior | The behavior controlling what happens if currently there is not enough memory available for the resource. |