From ccec97ea0a43dc2c3befbabe26474a890ac7f26f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Fri, 24 Feb 2017 01:20:30 +0100 Subject: Opengl glaDrawPixels removal: editors/spaces --- source/blender/editors/space_file/file_draw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/space_file/file_draw.c') diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index dff32a5f0d5..31326e2c18d 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -341,6 +341,7 @@ static void file_draw_preview( float scale; int ex, ey; bool use_dropshadow = !is_icon && (typeflags & FILE_TYPE_IMAGE); + float col[4] = {1.0f, 1.0f, 1.0f, 1.0f}; BLI_assert(imb != NULL); @@ -387,12 +388,11 @@ static void file_draw_preview( /* the image */ if (!is_icon && typeflags & FILE_TYPE_FTFONT) { - UI_ThemeColor(TH_TEXT); + UI_GetThemeColor4fv(TH_TEXT, col); } - else { - glColor4f(1.0, 1.0, 1.0, 1.0); - } - glaDrawPixelsTexScaled((float)xco, (float)yco, imb->x, imb->y, GL_RGBA, GL_UNSIGNED_BYTE, GL_NEAREST, imb->rect, scale, scale); + + immDrawPixelsTexScaled((float)xco, (float)yco, imb->x, imb->y, GL_RGBA, GL_UNSIGNED_BYTE, GL_NEAREST, imb->rect, + scale, scale, 1.0f, 1.0f, col); if (icon) { UI_icon_draw_aspect((float)xco, (float)yco, icon, icon_aspect, 1.0f); -- cgit v1.2.3