diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-04-16 15:12:09 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-04-16 15:12:09 +0300 |
commit | 13876d50cee8f8fc5b5eb4585718fc290aec33af (patch) | |
tree | 561acf9330d301c4178e2e1fd255b0d756a2f345 /source/blender/editors/space_image | |
parent | 70a6c737ec7eec3402418fef10af0db3b417b42a (diff) | |
parent | 3ea4d3dc07311a5799f7102a1e4f5920db367c0e (diff) |
Merge branch 'blender-v2.83-release'
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 85f7f744abc..6037c1d2ec8 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -575,6 +575,9 @@ static void draw_image_buffer(const bContext *C, float zoomx, float zoomy) { + /* Image are still drawn in display space. */ + glDisable(GL_FRAMEBUFFER_SRGB); + int x, y; int sima_flag = sima->flag & ED_space_image_get_display_channel_mask(ibuf); @@ -666,6 +669,8 @@ static void draw_image_buffer(const bContext *C, GPU_blend(false); } } + + glEnable(GL_FRAMEBUFFER_SRGB); } static void draw_image_buffer_repeated(const bContext *C, diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index ed14593ed2d..d7d85112497 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -670,14 +670,9 @@ static void image_main_region_draw(const bContext *C, ARegion *region) /* we set view2d from own zoom and offset each time */ image_main_region_set_view2d(sima, region); - /* Image are still drawn in display space. */ - glDisable(GL_FRAMEBUFFER_SRGB); - /* we draw image in pixelspace */ draw_image_main(C, region); - glEnable(GL_FRAMEBUFFER_SRGB); - /* and uvs in 0.0-1.0 space */ UI_view2d_view_ortho(v2d); |