summaryrefslogtreecommitdiffstats
path: root/progs/demos/renormal.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/demos/renormal.c')
-rw-r--r--progs/demos/renormal.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/progs/demos/renormal.c b/progs/demos/renormal.c
index 4fc19578cde..9e5da95484c 100644
--- a/progs/demos/renormal.c
+++ b/progs/demos/renormal.c
@@ -13,9 +13,15 @@
static GLfloat Phi = 0.0;
-static void Idle(void)
+static void Idle( void )
{
- Phi += 0.1;
+ static double t0 = -1.;
+ double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
+ if (t0 < 0.0)
+ t0 = t;
+ dt = t - t0;
+ t0 = t;
+ Phi += 3.0 * dt;
glutPostRedisplay();
}