Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_image/image_draw.c')
-rw-r--r--source/blender/editors/space_image/image_draw.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 85d153feb4c..7934d600cf1 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -55,6 +55,7 @@
#include "BIF_glutil.h"
+#include "GPU_framebuffer.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
#include "GPU_matrix.h"
@@ -570,7 +571,8 @@ static void draw_image_buffer(const bContext *C,
float zoomy)
{
/* Image are still drawn in display space. */
- glDisable(GL_FRAMEBUFFER_SRGB);
+ GPUFrameBuffer *fb = GPU_framebuffer_active_get();
+ GPU_framebuffer_bind_no_srgb(fb);
int x, y;
int sima_flag = sima->flag & ED_space_image_get_display_channel_mask(ibuf);
@@ -660,7 +662,7 @@ static void draw_image_buffer(const bContext *C,
}
}
- glEnable(GL_FRAMEBUFFER_SRGB);
+ GPU_framebuffer_bind(fb);
}
static void draw_image_buffer_repeated(const bContext *C,
@@ -824,7 +826,7 @@ static void draw_udim_tile_grids(ARegion *region, SpaceImage *sima, Image *ima)
immBegin(GPU_PRIM_LINES, 8 * num_tiles);
float theme_color[3], selected_color[3];
- UI_GetThemeColorShade3fv(TH_BACK, 60.0f, theme_color);
+ UI_GetThemeColorShade3fv(TH_GRID, 60.0f, theme_color);
UI_GetThemeColor3fv(TH_FACE_SELECT, selected_color);
if (ima != NULL) {