diff --git a/glxgears.c b/glxgears.c index c820ad5..adbe51e 100644 --- a/glxgears.c +++ b/glxgears.c @@ -242,7 +242,7 @@ static void draw(void) { } } -static GLfloat rotation_speed = 70.0; +static GLfloat rotation_speed = 250.0; static void idle(void) { static double t0 = -1.; @@ -267,6 +267,7 @@ static void update_idle_func(void) { /* change view angle, exit upon ESC */ static void key(unsigned char k, int, int) { + printf("Keycode passed: %c\n", k); switch (k) { case 'z': view_rotz += 5.0; @@ -284,6 +285,14 @@ static void key(unsigned char k, int, int) { Animate = !Animate; update_idle_func(); break; + case 'w': + rotation_speed += 10; + printf("rotation speed: %f\n", rotation_speed); + break; + case 's': + rotation_speed -= 10; + printf("rotation speed: %f\n", rotation_speed); + break; case '\e': cleanup(); default: