diff options
Diffstat (limited to 'progs/demos/drawpix.c')
-rw-r--r-- | progs/demos/drawpix.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/progs/demos/drawpix.c b/progs/demos/drawpix.c index 9f599890dbf..f86b1386b2a 100644 --- a/progs/demos/drawpix.c +++ b/progs/demos/drawpix.c @@ -1,4 +1,4 @@ -/* $Id: drawpix.c,v 1.3 1999/10/28 18:23:29 brianp Exp $ */ +/* $Id: drawpix.c,v 1.4 2000/09/08 21:45:21 brianp Exp $ */ /* * glDrawPixels demo/test/benchmark @@ -8,6 +8,9 @@ /* * $Log: drawpix.c,v $ + * Revision 1.4 2000/09/08 21:45:21 brianp + * added dither key option + * * Revision 1.3 1999/10/28 18:23:29 brianp * minor changes to Usage() function * @@ -51,7 +54,7 @@ static int DrawWidth, DrawHeight; static int Scissor = 0; static float Xzoom, Yzoom; static GLboolean DrawFront = GL_FALSE; - +static GLboolean Dither = GL_TRUE; static void Reset( void ) @@ -154,6 +157,13 @@ static void Key( unsigned char key, int x, int y ) case ' ': Reset(); break; + case 'd': + Dither = !Dither; + if (Dither) + glEnable(GL_DITHER); + else + glDisable(GL_DITHER); + break; case 'w': if (DrawWidth > 0) DrawWidth--; @@ -318,7 +328,7 @@ int main( int argc, char *argv[] ) if (ciMode) glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE ); else - glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); + glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE); glutCreateWindow(argv[0]); |