aboutsummaryrefslogtreecommitdiffstats
path: root/progs/demos/reflect.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-04-25 15:51:32 +0000
committerBrian Paul <[email protected]>2001-04-25 15:51:32 +0000
commit73ccfa0e9ae2b00e463d776fcb96c9b2605ca50f (patch)
treea25c16c9089f0811b2fafcf53914b995a1ea13d8 /progs/demos/reflect.c
parent3bfd0e6f9fee39c00cdbaf03d843a997ef16e827 (diff)
added ShowAlphaBuffer feature - 'a' key
Diffstat (limited to 'progs/demos/reflect.c')
-rw-r--r--progs/demos/reflect.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/progs/demos/reflect.c b/progs/demos/reflect.c
index 22856b542a3..0c734a030cb 100644
--- a/progs/demos/reflect.c
+++ b/progs/demos/reflect.c
@@ -1,4 +1,4 @@
-/* $Id: reflect.c,v 1.6 2001/01/23 23:43:53 brianp Exp $ */
+/* $Id: reflect.c,v 1.7 2001/04/25 15:51:32 brianp Exp $ */
/*
* Demo of a reflective, texture-mapped surface with OpenGL.
@@ -148,7 +148,7 @@ static void init( void )
glEnable( GL_LIGHT0 );
glEnable( GL_LIGHTING );
- glClearColor( 0.5, 0.5, 0.9, 1.0 );
+ glClearColor( 0.5, 0.5, 0.9, 0.0 );
glEnable( GL_NORMALIZE );
}
@@ -297,6 +297,9 @@ static void draw_scene( void )
else if (ShowBuffer == GL_STENCIL) {
ShowStencilBuffer(Width, Height, 255.0, 0.0);
}
+ else if (ShowBuffer == GL_ALPHA) {
+ ShowAlphaBuffer(Width, Height);
+ }
glutSwapBuffers();
@@ -332,6 +335,9 @@ static void Key( unsigned char key, int x, int y )
else if (key == 's') {
ShowBuffer = GL_STENCIL;
}
+ else if (key == 'a') {
+ ShowBuffer = GL_ALPHA;
+ }
else if (key == ' ') {
Anim = !Anim;
if (Anim)