[Bf-blender-cvs] [b36e8b0d55f] modifier-panels-ui: Fix (unreported) Image Editor UI drawing too dark
Philipp Oeser
noreply at git.blender.org
Thu Apr 16 21:30:28 CEST 2020
Commit: b36e8b0d55fc36c13da31c9646eac267c3157c01
Author: Philipp Oeser
Date: Thu Apr 16 12:39:51 2020 +0200
Branches: modifier-panels-ui
https://developer.blender.org/rBb36e8b0d55fc36c13da31c9646eac267c3157c01
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
===================================================================
M source/blender/editors/space_image/image_draw.c
M source/blender/editors/space_image/space_image.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list