super minor additions :3c
This commit is contained in:
parent
f42d103756
commit
a4f97089fe
11
glxgears.c
11
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 void idle(void) {
|
||||||
static double t0 = -1.;
|
static double t0 = -1.;
|
||||||
@ -267,6 +267,7 @@ static void update_idle_func(void) {
|
|||||||
|
|
||||||
/* change view angle, exit upon ESC */
|
/* change view angle, exit upon ESC */
|
||||||
static void key(unsigned char k, int, int) {
|
static void key(unsigned char k, int, int) {
|
||||||
|
printf("Keycode passed: %c\n", k);
|
||||||
switch (k) {
|
switch (k) {
|
||||||
case 'z':
|
case 'z':
|
||||||
view_rotz += 5.0;
|
view_rotz += 5.0;
|
||||||
@ -284,6 +285,14 @@ static void key(unsigned char k, int, int) {
|
|||||||
Animate = !Animate;
|
Animate = !Animate;
|
||||||
update_idle_func();
|
update_idle_func();
|
||||||
break;
|
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':
|
case '\e':
|
||||||
cleanup();
|
cleanup();
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user