Draw a checker board as a background for animation player
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 28 Feb 2013 14:25:18 +0000 (14:25 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 28 Feb 2013 14:25:18 +0000 (14:25 +0000)
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

index fd44f4a..b510956 100644 (file)
@@ -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)) {