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.
458{
459 if (layer >=
m_data.size()) {
461 "TextureContainer::set_pixels(f32) layer {} out of range", layer);
462 return;
463 }
464 auto* buf = std::get_if<std::vector<float>>(&
m_data[layer]);
465 if (!buf) {
467 "TextureContainer::set_pixels(f32) called on non-float format {}",
469 return;
470 }
471 if (data.size() != buf->size()) {
473 "TextureContainer::set_pixels(f32) size mismatch: got {} expected {}",
474 data.size(), buf->size());
475 return;
476 }
477
479 std::ranges::copy(data, buf->begin());
481}
#define MF_ERROR(comp, ctx,...)
std::vector< std::atomic< bool > > m_normalised_dirty
Memory::SeqlockArray m_slot_locks
Portal::Graphics::ImageFormat m_format
std::vector< DataVariant > m_data
@ ContainerProcessing
Container operations (Kakshya - file/stream/region processing)
@ Kakshya
Containers[Signalsource, Stream, File], Regions, DataProcessors.