diff options
Diffstat (limited to 'progs/trivial')
-rw-r--r-- | progs/trivial/Makefile | 6 | ||||
-rw-r--r-- | progs/trivial/tri.c | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/progs/trivial/Makefile b/progs/trivial/Makefile index 7610a5df08c..6fa51ce2cfe 100644 --- a/progs/trivial/Makefile +++ b/progs/trivial/Makefile @@ -102,9 +102,9 @@ UTIL_FILES = readtex.h readtex.c default: $(UTIL_FILES) $(PROGS) clean: - rm -f $(PROGS) - rm -f *.o - rm -f getproclist.h + -rm -f $(PROGS) + -rm -f *.o + -rm -f getproclist.h # auto code generation diff --git a/progs/trivial/tri.c b/progs/trivial/tri.c index 58a650b559f..d4a7f08ae34 100644 --- 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); } |