MayaFlux 0.4.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 301 of file TextureContainer.cpp.

302{
303 if (layer >= m_data.size())
304 return {};
305 auto [ptr, bytes] = variant_bytes(m_data[layer]);
306 return ptr ? std::span<const uint8_t>(ptr, bytes) : std::span<const uint8_t> {};
307}

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

+ Here is the caller graph for this function: