diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2000-09-08 21:45:21 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2000-09-08 21:45:21 +0000 |
commit | 9d3e5db9fc17643e8dfe0f85d38bf5718aca9b97 (patch) | |
tree | c422f488df5163297b2980b12dc5592ec7f81123 /progs | |
parent | 7f7b205259b228f81442f89e8318829737b08db6 (diff) |
added dither key option
Diffstat (limited to 'progs')
-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 9f599890db..f86b1386b2 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]); |