Replace the layer's pixel buffer with a float source.
Valid when the declared format is float-backed (R32F/RG32F/RGBA32F). Size must equal width * height * channels.
392{
393 if (layer >=
m_data.size()) {
395 "TextureContainer::set_pixels(f32) layer {} out of range", layer);
396 return;
397 }
398 auto* buf = std::get_if<std::vector<float>>(&
m_data[layer]);
399 if (!buf) {
401 "TextureContainer::set_pixels(f32) called on non-float format {}",
403 return;
404 }
405 if (data.size() != buf->size()) {
407 "TextureContainer::set_pixels(f32) size mismatch: got {} expected {}",
408 data.size(), buf->size());
409 return;
410 }
412 std::ranges::copy(data, buf->begin());
414}
#define MF_ERROR(comp, ctx,...)
void lock() override
Acquire a lock for thread-safe access.
Portal::Graphics::ImageFormat m_format
std::vector< DataVariant > m_processed_data
std::shared_mutex m_data_mutex
std::vector< DataVariant > m_data
@ ContainerProcessing
Container operations (Kakshya - file/stream/region processing)
@ Kakshya
Containers[Signalsource, Stream, File], Regions, DataProcessors.