summaryrefslogtreecommitdiffstats
path: root/progs/demos/texenv.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-04-21 14:50:12 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-04-21 14:50:12 +0000
commit95210bc8064113e9810c8ea46e2afbb7d5f80fcb (patch)
tree82a27cd2f07dd6e68e7c24713c4a946a59f14504 /progs/demos/texenv.c
parente5db876329126ff799999223fcd0813c3e5ed95c (diff)
fix minor warnings
Diffstat (limited to 'progs/demos/texenv.c')
-rw-r--r--progs/demos/texenv.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/progs/demos/texenv.c b/progs/demos/texenv.c
index 705cd2621f9..d64ae2ee264 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;