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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-02-28 18:25:18 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-02-28 18:25:18 +0400
commitbad03bcfb1c3aadb8ca85575abf84766766ed48f (patch)
treec3ac2b5b22a322216d15de04991cacb5d63db337 /source/blender
parent5cb22bbedf2169df23cf8ad894b2c0cad5e68244 (diff)
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.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/windowmanager/intern/wm_playanim.c7
1 files changed, 7 insertions, 0 deletions
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)) {