diff options
author | Brian Paul <[email protected]> | 2000-10-23 20:06:36 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2000-10-23 20:06:36 +0000 |
commit | 0448488e1128e39520cd20182c7abcccdacb5120 (patch) | |
tree | 0a640db48088e360d1f2113fea02567a50610b09 /progs | |
parent | 5a501fbd093080e213b686be1b44b375b4c72a25 (diff) |
added idle() func, enable fog by default
Diffstat (limited to 'progs')
-rw-r--r-- | progs/demos/tunnel.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/progs/demos/tunnel.c b/progs/demos/tunnel.c index 712edc5d7bd..431d2866030 100644 --- a/progs/demos/tunnel.c +++ b/progs/demos/tunnel.c @@ -57,7 +57,7 @@ static float v = 0.5; static float alpha = 90.0; static float beta = 90.0; -static int fog = 0; +static int fog = 1; static int bfcull = 1; static int usetex = 1; static int cstrip = 0; @@ -207,7 +207,6 @@ key(unsigned char k, int x, int y) XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW); break; #endif - case 'j': joyactive = (!joyactive); break; @@ -243,6 +242,7 @@ key(unsigned char k, int x, int y) fprintf(stderr, "Done.\n"); break; } + glutPostRedisplay(); } static void @@ -442,6 +442,14 @@ draw(void) } } +static void +idle(void) +{ + glutPostRedisplay(); +} + + + int main(int ac, char **av) { @@ -490,7 +498,7 @@ main(int ac, char **av) glutDisplayFunc(draw); glutKeyboardFunc(key); glutSpecialFunc(special); - glutIdleFunc(draw); + glutIdleFunc(idle); glEnable(GL_BLEND); /*glBlendFunc(GL_SRC_ALPHA_SATURATE,GL_ONE); */ |