diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-02-11 17:18:55 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-02-11 17:19:04 +0300 |
commit | 804e90b42d728ecb1073af8d0bae15a91b13a469 (patch) | |
tree | 309de25d99c92286b10c9d27e547fd43a69299c1 /source/blender/editors | |
parent | 58cdab8b9759dd59b55895f2f76b9624addbb324 (diff) |
DRW: Color Management improvement
Reviewed By: brecht sergey jbakker
Differential Revision: http://developer.blender.org/D6729
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index dc435efd86b..94c1f4cfc35 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -577,7 +577,7 @@ void ED_draw_imbuf_clipping(ImBuf *ibuf, if (ibuf->rect_float) { if (ibuf->float_colorspace) { ok = IMB_colormanagement_setup_glsl_draw_from_space( - view_settings, display_settings, ibuf->float_colorspace, ibuf->dither, true); + view_settings, display_settings, ibuf->float_colorspace, ibuf->dither, true, false); } else { ok = IMB_colormanagement_setup_glsl_draw( @@ -586,7 +586,7 @@ void ED_draw_imbuf_clipping(ImBuf *ibuf, } else { ok = IMB_colormanagement_setup_glsl_draw_from_space( - view_settings, display_settings, ibuf->rect_colorspace, ibuf->dither, false); + view_settings, display_settings, ibuf->rect_colorspace, ibuf->dither, false, false); } if (ok) { diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index b6710d8e6a5..e18eb062741 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); |