diff options
author | Brian Paul <[email protected]> | 2001-03-27 17:30:51 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-03-27 17:30:51 +0000 |
commit | 0a355dc01078ffd52873fa220feaf207dad10d9b (patch) | |
tree | 35d94baaff5f77476126601822dda396d4220290 /progs/demos/tunnel.c | |
parent | 25a5dc2ea718863af84511491b9184d06a8c2931 (diff) |
clean-up of tunnel demos
Diffstat (limited to 'progs/demos/tunnel.c')
-rw-r--r-- | progs/demos/tunnel.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/progs/demos/tunnel.c b/progs/demos/tunnel.c index 2244024aaa3..d495b31b4f6 100644 --- a/progs/demos/tunnel.c +++ b/progs/demos/tunnel.c @@ -17,7 +17,7 @@ #include <GL/glut.h> #include "readtex.c" -#include "tunneldat.c" +#include "tunneldat.h" #ifdef XMESA #include "GL/xmesa.h" @@ -29,6 +29,7 @@ static int HEIGHT = 480; static GLint T0 = 0; static GLint Frames = 0; +static GLint NiceFog = 1; #define NUMBLOC 5 @@ -36,6 +37,7 @@ static GLint Frames = 0; #define M_PI 3.1415926535 #endif +/* extern int striplength_skin_13[]; extern float stripdata_skin_13[]; @@ -47,7 +49,7 @@ extern float stripdata_skin_11[]; extern int striplength_skin_9[]; extern float stripdata_skin_9[]; - +*/ static int win = 0; @@ -104,7 +106,7 @@ inittextures(void) } static void -drawobjs(int *l, float *f) +drawobjs(const int *l, const float *f) { int mend, j; @@ -241,6 +243,10 @@ key(unsigned char k, int x, int y) inittextures(); fprintf(stderr, "Done.\n"); break; + case 'n': + NiceFog = !NiceFog; + printf("NiceFog %d\n", NiceFog); + break; } glutPostRedisplay(); } @@ -356,6 +362,11 @@ draw(void) int i; float base, offset; + if (NiceFog) + glHint(GL_FOG_HINT, GL_NICEST); + else + glHint(GL_FOG_HINT, GL_DONT_CARE); + dojoy(); glClear(GL_COLOR_BUFFER_BIT); |