}
}
+static void
+cleanup(void)
+{
+ int i;
+
+ glDeleteTextures(1, &t1id);
+ glDeleteTextures(1, &t2id);
+
+ glDeleteLists(skydlist, 1);
+ for (i = 0; i < MAX_LOD; i++) {
+ glDeleteLists(LODdlist[i], 1);
+ glDeleteLists(LODnumpoly[i], 1);
+ }
+}
+
+
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27:
+ cleanup();
exit(0);
break;
glutIdleFunc(draw);
glutMainLoop();
+ cleanup();
return 0;
}
}
}
+static void cleanup(void)
+{
+ glDeleteTextures(1, &t1id);
+ glDeleteTextures(1, &t2id);
+ glDeleteLists(teapotdlist, 1);
+ glDeleteLists(basedlist, 1);
+ glDeleteLists(lightdlist, 1);
+}
+
static void key(unsigned char k, int x, int y)
{
switch(k) {
case 27:
+ cleanup();
exit(0);
break;
glutIdleFunc(draw);
glutMainLoop();
+ cleanup();
return 0;
}
}
}
+static void
+cleanup(void)
+{
+ glDeleteTextures(1, &t1id);
+ glDeleteTextures(1, &t2id);
+}
+
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27:
+ cleanup();
exit(0);
break;
glutMainLoop();
+ cleanup();
return 0;
}
}
}
+static void
+cleanup(void)
+{
+ glDeleteTextures(1, &t1id);
+ glDeleteTextures(1, &t2id);
+}
+
static void
key(unsigned char k, int x, int y)
{
case 27:
glutDestroyWindow(channel[0]);
glutDestroyWindow(channel[1]);
+ cleanup();
exit(0);
break;
calcposobs();
glutMainLoop();
+ cleanup();
return 0;
}