added z/s keys to reset/step rotation
This commit is contained in:
parent
fb69fe58a0
commit
8211b20026
|
@ -106,8 +106,12 @@ Redisplay(void)
|
|||
static void
|
||||
Idle(void)
|
||||
{
|
||||
Zrot = glutGet(GLUT_ELAPSED_TIME) * 0.0005;
|
||||
glutPostRedisplay();
|
||||
if (anim) {
|
||||
Zrot = glutGet(GLUT_ELAPSED_TIME) * 0.0005;
|
||||
glutPostRedisplay();
|
||||
}
|
||||
else
|
||||
abort();
|
||||
}
|
||||
|
||||
|
||||
|
@ -149,6 +153,12 @@ Key(unsigned char key, int x, int y)
|
|||
else
|
||||
glutIdleFunc(NULL);
|
||||
break;
|
||||
case 'z':
|
||||
Zrot = 0;
|
||||
break;
|
||||
case 's':
|
||||
Zrot += 0.05;
|
||||
break;
|
||||
case 27:
|
||||
CleanUp();
|
||||
exit(0);
|
||||
|
|
Loading…
Reference in New Issue