MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ pixel_bytes() [2/2]

std::span< const uint8_t > MayaFlux::Kakshya::TextureContainer::pixel_bytes ( uint32_t  layer = 0) const

Read-only byte-level view over the pixel buffer.

The returned span covers the raw byte footprint of the layer, regardless of the underlying variant type. For uint8 formats this is the natural view; for uint16 and float formats the caller can reinterpret_cast for typed access, or prefer the as_uint16 / as_float accessors below.

Parameters
layerArray layer index for array textures (default 0).

Definition at line 523 of file TextureContainer.cpp.

524{
525 if (layer >= m_data.size())
526 return {};
527 auto [ptr, bytes] = variant_bytes(m_data[layer]);
528 return ptr ? std::span<const uint8_t>(ptr, bytes) : std::span<const uint8_t> {};
529}
const uint8_t * ptr

References ptr.

Referenced by MayaFlux::Portal::Text::rasterize_quads().

+ Here is the caller graph for this function: