LiteFX::Rendering::Backends::VulkanGraphicsFactory::createBuffer¶
Creates a buffer of type type.
Synopses¶
Declared in <litefx/backends/vulkan.hpp>
Creates a buffer of type type.
[[dllimport, dllexport]] virtual SharedPtr<IVulkanBuffer> createBuffer(
BufferType type,
ResourceHeap heap,
size_t elementSize,
UInt32 elements = 1,
ResourceUsage usage = ResourceUsage::Default,
AllocationBehavior allocationBehavior = AllocationBehavior::Default) const override;
Creates a buffer of type type.
[[dllimport, dllexport]] virtual SharedPtr<IVulkanBuffer> createBuffer(
String const& name,
BufferType type,
ResourceHeap heap,
size_t elementSize,
UInt32 elements = 1,
ResourceUsage usage = ResourceUsage::Default,
AllocationBehavior allocationBehavior = AllocationBehavior::Default) const override;
Return Value¶
The instance of the buffer.
Parameters¶
| Name | Description |
|---|---|
| type | The type of the buffer. |
| heap | The heap to allocate the buffer on. |
| elementSize | The size of an element in the buffer (in bytes). |
| 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. |
| name | The name of the buffer. |