From ca8e4528a22e8b4244264e01ba2a7b059b9a0573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 17 Sep 2026 21:04:27 -0700 Subject: [PATCH] GL: Fixed main back buffer sRGB state with MSAA. (#3987) --- src/renderer_gl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index b0cf366c1..85f61ffaf 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -4141,7 +4141,8 @@ namespace bgfx { namespace gl if (m_srgbWriteControlSupport) { - if (0 == m_currentFbo) + if (0 == m_currentFbo + || !isValid(_fbh) ) { const uint32_t surfaceFlags = isValid(_fbh) ? m_frameBuffers[_fbh.idx].m_desc.flags