[Bf-blender-cvs] [313086e2129] blender-v2.91-release: GL: Fix default framebuffers being bound using srgb

Clément Foucault noreply at git.blender.org
Tue Nov 3 14:44:37 CET 2020


Commit: 313086e2129721135e4eec1ce08fd9d12e197efd
Author: Clément Foucault
Date:   Tue Nov 3 14:23:03 2020 +0100
Branches: blender-v2.91-release
https://developer.blender.org/rB313086e2129721135e4eec1ce08fd9d12e197efd

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

===================================================================

M	source/blender/gpu/opengl/gl_framebuffer.cc

===================================================================

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 {



More information about the Bf-blender-cvs mailing list