From: Brian Paul Date: Fri, 8 Sep 2000 21:45:21 +0000 (+0000) Subject: added dither key option X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9d3e5db9fc17643e8dfe0f85d38bf5718aca9b97;p=mesa.git added dither key option --- 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]);