From 818d795b09637d16e00a18d729a5eaa14c19d423 Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Tue, 9 May 2017 18:02:25 +0200 Subject: [PATCH] vwebp: activate GLUT double-buffering This prevents the flickering of animated webp + alpha. Change-Id: I335a434ccc6c90e32528c9832555a38cc0f71cc4 --- examples/vwebp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/vwebp.c b/examples/vwebp.c index 485d629b..8feeccea 100644 --- a/examples/vwebp.c +++ b/examples/vwebp.c @@ -378,13 +378,13 @@ static void HandleDisplay(void) { } } glPopMatrix(); - glFlush(); + glutSwapBuffers(); } static void StartDisplay(void) { const int width = kParams.canvas_width; const int height = kParams.canvas_height; - glutInitDisplayMode(GLUT_RGBA); + glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA); glutInitWindowSize(width, height); glutCreateWindow("WebP viewer"); glutDisplayFunc(HandleDisplay);