Skip to content

LiteFX::Rendering::GraphicsFactory::createIndexBuffer

Creates an index buffer, based on the layout.

Synopses

Declared in <litefx/rendering.hpp>

Creates an index buffer, based on the layout.

[[dllimport, dllexport]] SharedPtr<IIndexBuffer> createIndexBuffer(
    IIndexBufferLayout const& layout,
    ResourceHeap heap,
    UInt32 elements,
    ResourceUsage usage = ResourceUsage::Default,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const;

» more...

Creates an index buffer, based on the layout.

virtual SharedPtr<TIndexBuffer> createIndexBuffer(
    index_buffer_layout_type const& layout,
    ResourceHeap heap,
    UInt32 elements,
    ResourceUsage usage = ResourceUsage::Default,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const = 0;

» more...

Creates an index buffer, based on the layout.

[[dllimport, dllexport]] SharedPtr<IIndexBuffer> createIndexBuffer(
    String const& name,
    IIndexBufferLayout const& layout,
    ResourceHeap heap,
    UInt32 elements,
    ResourceUsage usage = ResourceUsage::Default,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const;

» more...

Creates an index buffer, based on the layout.

virtual SharedPtr<TIndexBuffer> createIndexBuffer(
    String const& name,
    index_buffer_layout_type const& layout,
    ResourceHeap heap,
    UInt32 elements,
    ResourceUsage usage = ResourceUsage::Default,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const = 0;

» more...

Return Value

The instance of the index buffer.

Parameters

NameDescription
layoutThe layout of the index buffer.
heapThe heap to allocate the buffer on.
elementsThe number of elements within the vertex buffer (i.e. the number of indices).
usageThe intended usage for the buffer.
allocationBehaviorThe behavior controlling what happens if currently there is not enough memory available for the resource.
nameThe name of the buffer.