From bad03bcfb1c3aadb8ca85575abf84766766ed48f Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 28 Feb 2013 14:25:18 +0000 Subject: [PATCH] Draw a checker board as a background for animation player This makes it easier and useful to investigate alpha channels, without this straight colors are displayed on the screen which are completely useless in case of player. --- source/blender/windowmanager/intern/wm_playanim.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c index fd44f4a7169..b510956dbc1 100644 --- a/source/blender/windowmanager/intern/wm_playanim.c +++ b/source/blender/windowmanager/intern/wm_playanim.c @@ -252,8 +252,15 @@ static void playanim_toscreen(PlayAnimPict *picture, struct ImBuf *ibuf, int fon glRasterPos2f(0.0f, 0.0f); + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + fdrawcheckerboard(0.0f, 0.0f, ibuf->x, ibuf->y); + glDrawPixels(ibuf->x, ibuf->y, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect); + glDisable(GL_BLEND); + pupdate_time(); if (picture && (g_WS.qual & (WS_QUAL_SHIFT | WS_QUAL_LMOUSE)) && (fontid != -1)) {