Replace the layer's pixel buffer with a uint16 source.
Valid when the declared format is uint16-backed (R16/RG16/RGBA16, R16F/RG16F/RGBA16F). Size must equal width * height * channels.
590{
591 if (layer >=
m_data.size()) {
593 "TextureContainer::set_pixels(u16) layer {} out of range", layer);
594 return;
595 }
596 auto* buf = std::get_if<std::vector<uint16_t>>(&
m_data[layer]);
597 if (!buf) {
599 "TextureContainer::set_pixels(u16) called on non-uint16 format {}",
601 return;
602 }
603 if (data.size() != buf->size()) {
605 "TextureContainer::set_pixels(u16) size mismatch: got {} expected {}",
606 data.size(), buf->size());
607 return;
608 }
609
611 std::ranges::copy(data, buf->begin());
613}
#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.