-/* $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
/*
* $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
*
static int Scissor = 0;
static float Xzoom, Yzoom;
static GLboolean DrawFront = GL_FALSE;
-
+static GLboolean Dither = GL_TRUE;
static void Reset( void )
case ' ':
Reset();
break;
+ case 'd':
+ Dither = !Dither;
+ if (Dither)
+ glEnable(GL_DITHER);
+ else
+ glDisable(GL_DITHER);
+ break;
case 'w':
if (DrawWidth > 0)
DrawWidth--;
if (ciMode)
glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE );
else
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
+ glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE);
glutCreateWindow(argv[0]);