From 4697cee78b356c07cde6ec7f36a41d74d82ec38f Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 11 Feb 2008 09:46:10 -0700 Subject: press 0,1,2,etc keys for specific bias values --- progs/demos/lodbias.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'progs/demos/lodbias.c') diff --git a/progs/demos/lodbias.c b/progs/demos/lodbias.c index a4db22e26e4..c5a2a1b4573 100644 --- a/progs/demos/lodbias.c +++ b/progs/demos/lodbias.c @@ -159,6 +159,18 @@ static void Key( unsigned char key, int x, int y ) case 'B': Bias += 10; break; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + Bias = 100.0 * (key - '0'); + break; case 27: exit(0); break; -- cgit v1.2.3 From 417719c0a6397decd11780a643cb546ddd8f78d4 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 20 May 2008 15:11:33 -0600 Subject: mesa: call glutDestroyWindow() --- progs/demos/lodbias.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'progs/demos/lodbias.c') diff --git a/progs/demos/lodbias.c b/progs/demos/lodbias.c index c5a2a1b4573..30b1ed13d5f 100644 --- a/progs/demos/lodbias.c +++ b/progs/demos/lodbias.c @@ -42,7 +42,7 @@ static GLfloat Xrot = 0, Yrot = -30, Zrot = 0; static GLboolean Anim = GL_TRUE; static GLint Bias = 0, BiasStepSign = +1; /* ints avoid fp precision problem */ static GLint BiasMin = -400, BiasMax = 400; - +static int win = 0; static void @@ -172,6 +172,7 @@ static void Key( unsigned char key, int x, int y ) Bias = 100.0 * (key - '0'); break; case 27: + glutDestroyWindow(win); exit(0); break; } @@ -281,7 +282,7 @@ int main( int argc, char *argv[] ) glutInitWindowPosition( 0, 0 ); glutInitWindowSize( 350, 350 ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0]); + win = glutCreateWindow(argv[0]); glutReshapeFunc( Reshape ); glutKeyboardFunc( Key ); glutSpecialFunc( SpecialKey ); -- cgit v1.2.3