vwebp: activate GLUT double-buffering

This prevents the flickering of animated webp + alpha.

Change-Id: I335a434ccc6c90e32528c9832555a38cc0f71cc4
This commit is contained in:
Pascal Massimino 2017-05-09 18:02:25 +02:00
parent 4d7084350e
commit 818d795b09

View File

@ -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);