Wanted to add a proper variant that reads all layers at once into an
Image3D, but that requires the Image APIs to be made less crappy first.
So it's just this for noew because now I badly need it for
Text::DistanceFieldGlyphCacheArrayGL tests.
Interesting, the shader reinterpret code was added in 2016 but nothing
mentions *why* it was needed, what driver actually needs that. In 2025
all drivers I tested with are happy just with a passthrough.
Which means, this reinterpret is still only ever done in a single
overload of these APIs, reading to a buffer or reading a cube map
doesn't have this code path.
I just don't see a point in those. PBOs are for when a roundtrip through
a CPU memory would be wasteful, but these utils are mainly for use in
tests. Definitely not for being called several times per frame, because
the temporary framebuffer creation just doesn't make sense. Not sure
what was I thinking in 2016 when I added those, apart from "feature
parity for no practical reason".
Ugh. Was using this to verify that the glyph cache was correctly
populated, only to end up with a GL error that I thought was coming from
the glyph cache itself and not here. Wasted too much time on that.