projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9508293
)
call glutDestroyWindow()
author
Brian Paul
<brian.paul@tungstengraphics.com>
Thu, 8 May 2008 14:36:49 +0000
(08:36 -0600)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Thu, 8 May 2008 14:37:52 +0000
(08:37 -0600)
progs/trivial/tri.c
patch
|
blob
|
history
diff --git
a/progs/trivial/tri.c
b/progs/trivial/tri.c
index 58a650b559fef8cd7343222099fa0d8b5f9d9f26..d4a7f08ae344ad33e2f8816e7bf262c79c400918 100644
(file)
--- a/
progs/trivial/tri.c
+++ b/
progs/trivial/tri.c
@@
-33,6
+33,7
@@
GLenum doubleBuffer;
+int win;
static void Init(void)
{
@@
-59,7
+60,8
@@
static void Key(unsigned char key, int x, int y)
switch (key) {
case 27:
- exit(1);
+ glutDestroyWindow(win);
+ exit(0);
default:
return;
}
@@
-122,7
+124,8
@@
int main(int argc, char **argv)
type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
glutInitDisplayMode(type);
- if (glutCreateWindow("First Tri") == GL_FALSE) {
+ win = glutCreateWindow("First Tri");
+ if (!win) {
exit(1);
}