summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-03-24 17:20:52 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-03-24 17:21:18 -0600
commitf654ab40d6d6a5a712fdfac54f26d1611cf67d3f (patch)
tree2fceb593e4e24462fbe3b526817e1077f044bc29 /progs
parent45cc35e77600af8628393475405160e26d56d421 (diff)
mesa: call glutDestroyWindow (help find mem leaks)
Diffstat (limited to 'progs')
-rw-r--r--progs/demos/texenv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/progs/demos/texenv.c b/progs/demos/texenv.c
index 590867b494..c5a8b13f35 100644
--- a/progs/demos/texenv.c
+++ b/progs/demos/texenv.c
@@ -76,6 +76,8 @@ int textureWidth = 64;
int textureHeight = 64;
int winWidth = 580, winHeight = 720;
+static int Win;
+
struct formatInfo {
GLenum baseFormat;
@@ -288,6 +290,7 @@ static void keyboard( unsigned char c, int x, int y )
displayLevelInfo = !displayLevelInfo;
break;
case 27: /* Escape key should force exit. */
+ glutDestroyWindow(Win);
exit(0);
break;
default:
@@ -785,7 +788,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( winWidth, winHeight );
glutInitWindowPosition( 0, 0 );
- glutCreateWindow( "Texture Environment Test" );
+ Win = glutCreateWindow( "Texture Environment Test" );
initialize();
instructions();