diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-11-03 16:23:03 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-11-03 16:44:28 +0300 |
commit | 313086e2129721135e4eec1ce08fd9d12e197efd (patch) | |
tree | e354e3732720b038aa3d5b7c128b847bccaa0761 /source/blender/gpu | |
parent | 3c953a1b09c9025086f38afdb60b02ba1b7d5970 (diff) |
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
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/opengl/gl_framebuffer.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |