LiteFX::Rendering::Backends::DirectX12GraphicsFactory::tryCreateVertexBuffer¶
Tries to create a vertex buffer, based on the layout.
Synopses¶
Declared in <litefx/backends/dx12.hpp>
Tries to create a vertex buffer, based on the layout.
[[dllimport, dllexport]] virtual bool tryCreateVertexBuffer(
SharedPtr<IDirectX12VertexBuffer>& buffer,
DirectX12VertexBufferLayout const& layout,
ResourceHeap heap,
UInt32 elements = 1,
ResourceUsage usage = ResourceUsage::Default,
AllocationBehavior allocationBehavior = AllocationBehavior::Default) const override;
Tries to create a vertex buffer, based on the layout.
[[dllimport]] virtual bool tryCreateVertexBuffer(
SharedPtr<IDirectX12VertexBuffer>& buffer,
vertex_buffer_layout_type const& layout,
ResourceHeap heap,
UInt32 elements = 1,
ResourceUsage usage = ResourceUsage::Default,
AllocationBehavior allocationBehavior = AllocationBehavior::Default) const = 0;
Tries to create a vertex buffer, based on the layout.
[[dllimport, dllexport]] virtual bool tryCreateVertexBuffer(
SharedPtr<IDirectX12VertexBuffer>& buffer,
String const& name,
DirectX12VertexBufferLayout const& layout,
ResourceHeap heap,
UInt32 elements = 1,
ResourceUsage usage = ResourceUsage::Default,
AllocationBehavior allocationBehavior = AllocationBehavior::Default) const override;
Tries to create a vertex buffer, based on the layout.
[[dllimport]] virtual bool tryCreateVertexBuffer(
SharedPtr<IDirectX12VertexBuffer>& buffer,
String const& name,
vertex_buffer_layout_type const& layout,
ResourceHeap heap,
UInt32 elements = 1,
ResourceUsage usage = ResourceUsage::Default,
AllocationBehavior allocationBehavior = AllocationBehavior::Default) const = 0;
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 vertex buffer. |
| heap | The heap to allocate the buffer on. |
| elements | The number of elements within the vertex buffer (i.e. the number of vertices). |
| 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. |