[Bf-blender-cvs] [5db185d1c48] draw-colormanagement: GPUViewport: Fix image uv editor.

Clément Foucault noreply at git.blender.org
Sun Jan 26 21:08:52 CET 2020


Commit: 5db185d1c4851ee8a148ef59b4f7ed8ef6ea3c5a
Author: Clément Foucault
Date:   Sun Jan 26 17:33:19 2020 +0100
Branches: draw-colormanagement
https://developer.blender.org/rB5db185d1c4851ee8a148ef59b4f7ed8ef6ea3c5a

GPUViewport: Fix image uv editor.

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

M	source/blender/editors/space_image/space_image.c

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

diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 57560c560d7..19d92a520de 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -646,13 +646,18 @@ static void image_main_region_draw(const bContext *C, ARegion *ar)
       ar->draw_buffer->viewport[ar->draw_buffer->stereo ? sima->iuser.multiview_eye : 0];
   DefaultFramebufferList *fbl = GPU_viewport_framebuffer_list_get(viewport);
   GPU_framebuffer_bind(fbl->default_fb);
+  GPU_clear_color(0.0f, 0.0f, 0.0f, 0.0f);
+  GPU_clear(GPU_COLOR_BIT);
+
+  GPU_framebuffer_bind(fbl->overlay_fb);
+  glDisable(GL_FRAMEBUFFER_SRGB);
 
   /* XXX not supported yet, disabling for now */
   scene->r.scemode &= ~R_COMP_CROP;
 
   /* clear and setup matrix */
   UI_GetThemeColor3fv(TH_BACK, col);
-  GPU_clear_color(col[0], col[1], col[2], 0.0f);
+  GPU_clear_color(col[0], col[1], col[2], 1.0f);
   GPU_clear(GPU_COLOR_BIT);
   GPU_depth_test(false);



More information about the Bf-blender-cvs mailing list