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.
367{
368 if (layer >=
m_data.size()) {
370 "TextureContainer::set_pixels(u16) layer {} out of range", layer);
371 return;
372 }
373 auto* buf = std::get_if<std::vector<uint16_t>>(&
m_data[layer]);
374 if (!buf) {
376 "TextureContainer::set_pixels(u16) called on non-uint16 format {}",
378 return;
379 }
380 if (data.size() != buf->size()) {
382 "TextureContainer::set_pixels(u16) size mismatch: got {} expected {}",
383 data.size(), buf->size());
384 return;
385 }
387 std::ranges::copy(data, buf->begin());
389}
#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.