diff options
Diffstat (limited to 'progs/demos/texenv.c')
-rw-r--r-- | progs/demos/texenv.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/progs/demos/texenv.c b/progs/demos/texenv.c index 705cd2621f..d64ae2ee26 100644 --- a/progs/demos/texenv.c +++ b/progs/demos/texenv.c @@ -169,7 +169,7 @@ struct baseFormatInfo baseFormats[] = }; #define NUM_ENV_COLORS (sizeof(envColors) / sizeof(envColors[0])) -int envColor; +int envColor = 0; GLfloat envColors[][4] = { { 0.0, 0.0, 0.0, 1.0 }, @@ -201,8 +201,6 @@ static void checkErrors( void ) { GLenum error; - return; - while ( (error = glGetError()) != GL_NO_ERROR ) { fprintf( stderr, "Error: %s\n", (char *) gluErrorString( error ) ); } @@ -271,7 +269,8 @@ static void keyboard( unsigned char c, int x, int y ) { switch ( c ) { case 'c': - envColor = (++envColor) % (int) NUM_ENV_COLORS; + envColor++; + envColor = envColor % (int) NUM_ENV_COLORS; break; case 'g': drawBackground = !drawBackground; |