Fix (unreported) Image Editor UI drawing too dark

Caused by rBf0221ff6674f.

Only draw the Image buffer itself in display space.

Differential Revision: https://developer.blender.org/D7449
This commit is contained in:
Philipp Oeser 2020-04-16 12:39:51 +02:00
parent 5d9d246851
commit 3ea4d3dc07
2 changed files with 5 additions and 5 deletions

View File

@ -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,

View File

@ -669,14 +669,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);