projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'mesa_7_5_branch'
[mesa.git]
/
progs
/
demos
/
tunnel2.c
diff --git
a/progs/demos/tunnel2.c
b/progs/demos/tunnel2.c
index f4171a8346d60c5b9414e7c3806389e6d3298dfe..0288ea0f8ceaede6de5f4e5aee1d99f825ec1a55 100644
(file)
--- a/
progs/demos/tunnel2.c
+++ b/
progs/demos/tunnel2.c
@@
-200,6
+200,13
@@
special(int k, int x, int y)
}
}
}
}
+static void
+cleanup(void)
+{
+ glDeleteTextures(1, &t1id);
+ glDeleteTextures(1, &t2id);
+}
+
static void
key(unsigned char k, int x, int y)
{
static void
key(unsigned char k, int x, int y)
{
@@
-207,6
+214,7
@@
key(unsigned char k, int x, int y)
case 27:
glutDestroyWindow(channel[0]);
glutDestroyWindow(channel[1]);
case 27:
glutDestroyWindow(channel[0]);
glutDestroyWindow(channel[1]);
+ cleanup();
exit(0);
break;
exit(0);
break;
@@
-602,6
+610,7
@@
main(int ac, char **av)
calcposobs();
glutMainLoop();
calcposobs();
glutMainLoop();
+ cleanup();
return 0;
}
return 0;
}