From 155a2e35e6a74288fce292179c9068ff4ccf4712 Mon Sep 17 00:00:00 2001 From: Christophe Dehais Date: Thu, 13 Oct 2022 14:28:31 +0200 Subject: [PATCH] Fix texture conversion in the GL backend The line as currently written disallows conversions (except swizzle) because `convert` can't be true if `compressed` isn't. --- src/renderer_gl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index d651b3f345..5a8823d619 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -5950,7 +5950,7 @@ namespace bgfx { namespace gl const bool unpackRowLength = !!BGFX_CONFIG_RENDERER_OPENGL || s_extension[Extension::EXT_unpack_subimage].m_supported; const bool compressed = bimg::isCompressed(bimg::TextureFormat::Enum(m_requestedFormat) ); const bool convert = false - || (compressed && m_textureFormat != m_requestedFormat) + || (!compressed && m_textureFormat != m_requestedFormat) || swizzle ;