MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ clone_to() [1/2]

std::shared_ptr< Buffers::Buffer > MayaFlux::Buffers::VKBuffer::clone_to ( uint8_t dest_desc)
overridevirtual

Creates a clone of this buffer for a specific channel or usage enum.

Parameters
dest_descDestination channel identifier or usage descriptor for the cloned buffer
Returns
Shared pointer to the cloned buffer

This method creates a new instance of the buffer with the same data and properties, but assigned to a different channel. The cloned buffer can be used independently in processing chains.

NOTE: The moment of cloning is the divergence point between the original and the cloned. While they both will follow the same processing chain or have the same default procesor, any changes made to one buffer after cloning will not affect the other.

Implements MayaFlux::Buffers::Buffer.

Definition at line 513 of file VKBuffer.cpp.

514{
515 auto usage = static_cast<Usage>(dest_desc);
516 return std::dynamic_pointer_cast<Buffers::Buffer>(clone_to(usage));
517}
std::shared_ptr< Buffer > clone_to(uint8_t dest_desc) override
Creates a clone of this buffer for a specific channel or usage enum.
Definition VKBuffer.cpp:513
Portal::Graphics::BufferUsageHint Usage
Definition VKBuffer.hpp:80