summaryrefslogtreecommitdiffstats
path: root/progs/glsl
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-05-16 16:02:52 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-05-16 16:02:52 -0600
commitb86cf714916d1bfdd6152839a8753cb3f3039cb2 (patch)
treea8a5e15402f68f140c8af4661a7020262e79fe7f /progs/glsl
parentfc0a48d587e3aaae4b0e1fc0b9652c7f3d8e1d4b (diff)
downloadexternal_mesa3d-b86cf714916d1bfdd6152839a8753cb3f3039cb2.zip
external_mesa3d-b86cf714916d1bfdd6152839a8753cb3f3039cb2.tar.gz
external_mesa3d-b86cf714916d1bfdd6152839a8753cb3f3039cb2.tar.bz2
mesa: call glutDestroyWindow() on exit to help find mem leaks
Diffstat (limited to 'progs/glsl')
-rw-r--r--progs/glsl/texdemo1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/progs/glsl/texdemo1.c b/progs/glsl/texdemo1.c
index d29ecf4..3ceae14 100644
--- a/progs/glsl/texdemo1.c
+++ b/progs/glsl/texdemo1.c
@@ -48,6 +48,7 @@ static GLfloat TexXrot = 0, TexYrot = 0;
static GLfloat Xrot = 20.0, Yrot = 20.0, Zrot = 0.0;
static GLfloat EyeDist = 10;
static GLboolean Anim = GL_TRUE;
+static int win = 0;
struct uniform_info {
@@ -177,6 +178,7 @@ key(unsigned char k, int x, int y)
EyeDist = 90;
break;
case 27:
+ glutDestroyWindow(win);
exit(0);
}
glutPostRedisplay();
@@ -554,7 +556,7 @@ main(int argc, char *argv[])
glutInit(&argc, argv);
glutInitWindowSize(500, 400);
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
- glutCreateWindow(Demo);
+ win = glutCreateWindow(Demo);
glutReshapeFunc(Reshape);
glutKeyboardFunc(key);
glutSpecialFunc(specialkey);