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

◆ resolve_gpu_image()

template<GpuImageSource T>
std::shared_ptr< Core::VKImage > MayaFlux::Buffers::resolve_gpu_image ( const T &  buffer)

Resolve the GPU-resident image from any GpuImageSource buffer.

Selects get_texture() or get_gpu_texture() at compile time based on which the concrete buffer type exposes. Returns nullptr if the buffer has not yet produced a GPU texture.

Template Parameters
TA type satisfying GpuImageSource.
Parameters
bufferThe pixel-bearing buffer to query.
Returns
GPU-resident VKImage, or nullptr.

Definition at line 219 of file StagingUtils.hpp.

220{
221 if constexpr (requires(const T& b) {
222 { b.get_texture() } -> std::convertible_to<std::shared_ptr<Core::VKImage>>;
223 }) {
224 return buffer.get_texture();
225 } else {
226 return buffer.get_gpu_texture();
227 }
228}
size_t b

References b.

Referenced by MayaFlux::Buffers::ImageCVProcessor< T >::processing_function().

+ Here is the caller graph for this function: