Allows the object to transfer data between its local memory from or to an arbitrary LiteFX::Rendering::IBuffer object.
More...
#include <rendering.hpp>
Inherited by LiteFX::Rendering::ITexture< VulkanDescriptorLayout, IVulkanBuffer, VulkanCommandBuffer >, LiteFX::Rendering::ITexture< DirectX12DescriptorLayout, IDirectX12Buffer, DirectX12CommandBuffer >, LiteFX::Rendering::ITransferableBuffer< IVulkanBuffer, VulkanCommandBuffer > [virtual]
, LiteFX::Rendering::ITransferableBuffer< TDerived, TCommandBuffer > [virtual]
, LiteFX::Rendering::ITransferableBuffer< IDirectX12Buffer, DirectX12CommandBuffer > [virtual]
, LiteFX::Rendering::ITexture< TDescriptorLayout, TBufferInterface, TCommandBuffer >, and LiteFX::Rendering::ITransferableBuffer< TBufferInterface, TCommandBuffer > [virtual]
.
|
virtual | ~ITransferable () noexcept=default |
|
virtual void | transferFrom (const TCommandBuffer &commandBuffer, const TBufferInterface &source, const UInt32 &sourceElement=0, const UInt32 &targetElement=0, const UInt32 &elements=1) const =0 |
| Transfers data from the source buffer into the objects local memory. More...
|
|
virtual void | transferTo (const TCommandBuffer &commandBuffer, const TBufferInterface &target, const UInt32 &sourceElement=0, const UInt32 &targetElement=0, const UInt32 &elements=1) const =0 |
| Transfers data from the objects local memory into the target buffer. More...
|
|
template<typename TBufferInterface, typename TCommandBuffer>
class LiteFX::Rendering::ITransferable< TBufferInterface, TCommandBuffer >
Allows the object to transfer data between its local memory from or to an arbitrary LiteFX::Rendering::IBuffer object.
- Template Parameters
-
TBufferInterface | The type of the buffer interface. Must inherit from IBuffer. |
TCommandBuffer | The type of the command buffer. Must implement from ICommandBuffer. |
◆ buffer_type
template<typename TBufferInterface , typename TCommandBuffer >
◆ command_buffer_type
template<typename TBufferInterface , typename TCommandBuffer >
◆ ~ITransferable()
template<typename TBufferInterface , typename TCommandBuffer >
◆ transferFrom()
template<typename TBufferInterface , typename TCommandBuffer >
virtual void LiteFX::Rendering::ITransferable< TBufferInterface, TCommandBuffer >::transferFrom |
( |
const TCommandBuffer & |
commandBuffer, |
|
|
const TBufferInterface & |
source, |
|
|
const UInt32 & |
sourceElement = 0 , |
|
|
const UInt32 & |
targetElement = 0 , |
|
|
const UInt32 & |
elements = 1 |
|
) |
| const |
|
pure virtual |
Transfers data from the source buffer into the objects local memory.
- Parameters
-
commandBuffer | The command buffer to issue the transfer command to. |
source | The source buffer to transfer data from. |
sourceElement | The index of the first element in the source buffer to copy. |
targetElement | The index of the first element in the current buffer to copy to. |
elements | The number of elements to copy from the source buffer into the current buffer. |
- Exceptions
-
ArgumentOutOfRangeException | Thrown, if the number of either the source buffer or the current buffer has not enough elements for the specified elements parameter. |
◆ transferTo()
template<typename TBufferInterface , typename TCommandBuffer >
virtual void LiteFX::Rendering::ITransferable< TBufferInterface, TCommandBuffer >::transferTo |
( |
const TCommandBuffer & |
commandBuffer, |
|
|
const TBufferInterface & |
target, |
|
|
const UInt32 & |
sourceElement = 0 , |
|
|
const UInt32 & |
targetElement = 0 , |
|
|
const UInt32 & |
elements = 1 |
|
) |
| const |
|
pure virtual |
Transfers data from the objects local memory into the target buffer.
- Parameters
-
commandBuffer | The command buffer to issue the transfer command to. |
target | The target buffer to transfer data to. |
sourceElement | The index of the first element in the current buffer to copy. |
targetElement | The index of the first element in the target buffer to copy to. |
elements | The number of elements to copy from the current buffer into the target buffer. |
- Exceptions
-
ArgumentOutOfRangeException | Thrown, if the number of either the target buffer or the current buffer has not enough elements for the specified elements parameter. |