summaryrefslogtreecommitdiff
path: root/progs/demos/texenv.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-08-21 21:05:39 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-08-21 21:05:39 +0000
commitf4f4dab25a6c52d403a0b19ab28b443cda8f5730 (patch)
tree6b401d4e1b0a78b875e82566b05349f4f91a71b1 /progs/demos/texenv.c
parent043654bbfbee4f30d7596090cb00681b5972725c (diff)
changed quad vertex colors to be tessellation invariant
Diffstat (limited to 'progs/demos/texenv.c')
-rw-r--r--progs/demos/texenv.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/progs/demos/texenv.c b/progs/demos/texenv.c
index fe8975ed0d..bae3117544 100644
--- a/progs/demos/texenv.c
+++ b/progs/demos/texenv.c
@@ -561,24 +561,28 @@ static void drawSample( int x, int y, int w, int h,
if ( drawSmooth ) {
glShadeModel( GL_SMOOTH );
}
+ else {
+ glShadeModel( GL_FLAT );
+ glColor4f(1, 1, 1, 1);
+ }
if ( drawTextured ) {
glEnable( GL_TEXTURE_2D );
}
glBegin( GL_QUADS );
- glColor4f( 1.0, 0.0, 0.0, 1.0 );
+ if ( drawSmooth ) glColor4f( 1.0, 0.0, 1.0, 1.0 );
glTexCoord2f( 0.0, 0.0 );
glVertex2f( -0.8, -0.8 );
- glColor4f( 0.0, 1.0, 0.0, 1.0 );
+ if ( drawSmooth ) glColor4f( 1.0, 0.0, 1.0, 1.0 );
glTexCoord2f( 1.0, 0.0 );
glVertex2f( 0.8, -0.8 );
- glColor4f( 0.0, 0.0, 1.0, 1.0 );
+ if ( drawSmooth ) glColor4f( 0.0, 1.0, 0.0, 1.0 );
glTexCoord2f( 1.0, 1.0 );
glVertex2f( 0.8, 0.8 );
- glColor4f( 1.0, 1.0, 1.0, 1.0 );
+ if ( drawSmooth ) glColor4f( 0.0, 1.0, 0.0, 1.0 );
glTexCoord2f( 0.0, 1.0 );
glVertex2f( -0.8, 0.8 );
glEnd();