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.
432{
433 if (layer >=
m_data.size()) {
435 "TextureContainer::set_pixels(u16) layer {} out of range", layer);
436 return;
437 }
438 auto* buf = std::get_if<std::vector<uint16_t>>(&
m_data[layer]);
439 if (!buf) {
441 "TextureContainer::set_pixels(u16) called on non-uint16 format {}",
443 return;
444 }
445 if (data.size() != buf->size()) {
447 "TextureContainer::set_pixels(u16) size mismatch: got {} expected {}",
448 data.size(), buf->size());
449 return;
450 }
451
453 std::ranges::copy(data, buf->begin());
455}
#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.