From 313086e2129721135e4eec1ce08fd9d12e197efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 3 Nov 2020 14:23:03 +0100 Subject: GL: Fix default framebuffers being bound using srgb Default backbuffers needs not to be bound with sRGB encoding enabled. This works when using `GPU_framebuffer_restore` but using `GPU_framebuffer_bind` would trigger the wrong behavior. This fix T81969 UI turns whiteish when playing video sequence based on a scene and moving in the image editor after saving --- source/blender/gpu/opengl/gl_framebuffer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/opengl/gl_framebuffer.cc b/source/blender/gpu/opengl/gl_framebuffer.cc index cd87fc88144..a180aa270b0 100644 --- a/source/blender/gpu/opengl/gl_framebuffer.cc +++ b/source/blender/gpu/opengl/gl_framebuffer.cc @@ -288,7 +288,7 @@ void GLFrameBuffer::bind(bool enabled_srgb) if (context_->active_fb != this || enabled_srgb_ != enabled_srgb) { enabled_srgb_ = enabled_srgb; - if (enabled_srgb) { + if (enabled_srgb && srgb_) { glEnable(GL_FRAMEBUFFER_SRGB); } else { -- cgit v1.2.3