LiteFX::Rendering::Backends::VulkanGraphicsFactory::createIndexBuffer¶
Creates an index buffer, based on the layout.
Synopsis¶
Declared in <litefx/rendering.hpp>
[[dllimport]] virtual SharedPtr<IVulkanIndexBuffer> createIndexBuffer(
String const& name,
index_buffer_layout_type const& layout,
ResourceHeap heap,
UInt32 elements,
ResourceUsage usage = ResourceUsage::Default,
AllocationBehavior allocationBehavior = AllocationBehavior::Default) const = 0;
Description¶
An index buffer can be used by different RenderPipeline "RenderPipelines", as long as they share a common input assembler state.
The size of the buffer is computed from the element size index buffer layout, times the number of elements given by the elements parameter.
Return Value¶
The instance of the index buffer.
Parameters¶
| Name | Description |
|---|---|
| name | The name of the buffer. |
| layout | The layout of the index buffer. |
| heap | The heap to allocate the buffer on. |
| usage | The intended usage for the buffer. |
| elements | The number of elements within the vertex buffer (i.e. the number of indices). |
| allocationBehavior | The behavior controlling what happens if currently there is not enough memory available for the resource. |