summaryrefslogtreecommitdiffstats
path: root/progs/demos/texenv.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-03-27 17:38:28 +0000
committerBrian Paul <[email protected]>2001-03-27 17:38:28 +0000
commit5479e9303126490a6638eb0f68f3cc7e6bd1a9d2 (patch)
treede6908d7212677ecc090ede2465c88075557ebe3 /progs/demos/texenv.c
parent8afa9e593b603583a61a147009d14dfaaa68e617 (diff)
double buffer by default. if drawSmooth, use 50% alpha at top of polygon
Diffstat (limited to 'progs/demos/texenv.c')
-rw-r--r--progs/demos/texenv.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/progs/demos/texenv.c b/progs/demos/texenv.c
index 6cf855887e2..e31876c8aa7 100644
--- a/progs/demos/texenv.c
+++ b/progs/demos/texenv.c
@@ -65,7 +65,7 @@ GLfloat *labelInfoColor = labelColor0;
GLfloat labelLevelColor0[4] = { 0.8, 0.8, 0.1, 1.0 };
GLfloat labelLevelColor1[4] = { 0.0, 0.0, 0.0, 1.0 };
-GLboolean doubleBuffered = GL_FALSE;
+GLboolean doubleBuffered = GL_TRUE;
GLboolean drawBackground = GL_FALSE;
GLboolean drawBlended = GL_TRUE;
GLboolean drawSmooth = GL_FALSE;
@@ -574,6 +574,10 @@ static void drawSample( int x, int y, int w, int h,
glEnable( GL_TEXTURE_2D );
}
+ /*
+ * if (drawSmooth) then draw quad which goes from purple at the
+ * bottom (100% alpha) to green at the top (50% alpha).
+ */
glBegin( GL_QUADS );
if ( drawSmooth ) glColor4f( 1.0, 0.0, 1.0, 1.0 );
glTexCoord2f( 0.0, 0.0 );
@@ -583,11 +587,11 @@ static void drawSample( int x, int y, int w, int h,
glTexCoord2f( 1.0, 0.0 );
glVertex2f( 0.8, -0.8 );
- if ( drawSmooth ) glColor4f( 0.0, 1.0, 0.0, 1.0 );
+ if ( drawSmooth ) glColor4f( 0.0, 1.0, 0.0, 0.5 );
glTexCoord2f( 1.0, 1.0 );
glVertex2f( 0.8, 0.8 );
- if ( drawSmooth ) glColor4f( 0.0, 1.0, 0.0, 1.0 );
+ if ( drawSmooth ) glColor4f( 0.0, 1.0, 0.0, 0.5 );
glTexCoord2f( 0.0, 1.0 );
glVertex2f( -0.8, 0.8 );
glEnd();