view3d
diff src/main.c @ 5:58ddd42848f9
foo
author | John Tsiombikas <nuclear@mutantstargoat.com> |
---|---|
date | Thu, 19 Jan 2012 07:37:31 +0200 |
parents | 0aee5df08cfc |
children | 5562a637e5aa |
line diff
1.1 --- a/src/main.c Thu Jan 19 07:03:47 2012 +0200 1.2 +++ b/src/main.c Thu Jan 19 07:37:31 2012 +0200 1.3 @@ -241,6 +241,36 @@ 1.4 glutPostRedisplay(); 1.5 break; 1.6 1.7 + case 'f': 1.8 + { 1.9 + static int fullscr; 1.10 + if(++fullscr & 1) { 1.11 + glutFullScreen(); 1.12 + } else { 1.13 + glutPositionWindow(20, 20); 1.14 + } 1.15 + } 1.16 + break; 1.17 + 1.18 + { 1.19 + static float bgval; 1.20 + case '=': 1.21 + bgval += 0.1; 1.22 + if(bgval > 1.0) 1.23 + bgval = 1.0; 1.24 + glClearColor(bgval, bgval, bgval, 1.0); 1.25 + glutPostRedisplay(); 1.26 + break; 1.27 + 1.28 + case '-': 1.29 + bgval -= 0.1; 1.30 + if(bgval < 0.0) 1.31 + bgval = 0.0; 1.32 + glClearColor(bgval, bgval, bgval, 1.0); 1.33 + glutPostRedisplay(); 1.34 + break; 1.35 + } 1.36 + 1.37 default: 1.38 break; 1.39 }