mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 06:00:10 +01:00
added dither key option
This commit is contained in:
parent
7f7b205259
commit
9d3e5db9fc
1 changed files with 13 additions and 3 deletions
|
|
@ -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]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue