From ef17266906bb8fbbf0a45932cc0e7c91db466f73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 19 Apr 2025 22:00:05 +0200 Subject: [PATCH] Text: query the actual format in GlyphCacheGL::processedImage(). Right now it didn't really matter as the only subclass making use of this was DistanceFieldGlyphCacheGL in which the processed format was always R8Unorm, nevertheless it's better this way, and makes it work with 16-bit output and such that might get added in the future. --- src/Magnum/Text/GlyphCacheGL.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magnum/Text/GlyphCacheGL.cpp b/src/Magnum/Text/GlyphCacheGL.cpp index 91ba59a86..c1351bf73 100644 --- a/src/Magnum/Text/GlyphCacheGL.cpp +++ b/src/Magnum/Text/GlyphCacheGL.cpp @@ -192,7 +192,7 @@ void GlyphCacheGL::doSetProcessedImage(const Vector2i& offset, const ImageView2D #ifndef MAGNUM_TARGET_GLES Image3D GlyphCacheGL::doProcessedImage() { - Image2D out = static_cast(*_state).texture.image(0, PixelFormat::R8Unorm); + Image2D out = static_cast(*_state).texture.image(0, processedFormat()); return Image3D{out.format(), {out.size(), 1}, out.release()}; } #endif