summaryrefslogtreecommitdiffstats
path: root/hacks/glx/projectiveplane.c
diff options
context:
space:
mode:
Diffstat (limited to 'hacks/glx/projectiveplane.c')
-rw-r--r--hacks/glx/projectiveplane.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/hacks/glx/projectiveplane.c b/hacks/glx/projectiveplane.c
index 2a1e566..3a052ea 100644
--- a/hacks/glx/projectiveplane.c
+++ b/hacks/glx/projectiveplane.c
@@ -219,7 +219,6 @@ static const char sccsid[] = "@(#)projectiveplane.c 1.1 14/01/01 xlockmore";
# define DEFAULTS "*delay: 10000 \n" \
"*showFPS: False \n" \
-# define free_projectiveplane 0
# define release_projectiveplane 0
# include "xlockmore.h" /* from the xscreensaver distribution */
#else /* !STANDALONE */
@@ -1516,7 +1515,7 @@ ENTRYPOINT void draw_projectiveplane(ModeInfo *mi)
if (!pp->glx_context)
return;
- glXMakeCurrent(display,window,*(pp->glx_context));
+ glXMakeCurrent(display, window, *pp->glx_context);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
@@ -1540,11 +1539,21 @@ ENTRYPOINT void change_projectiveplane(ModeInfo *mi)
if (!pp->glx_context)
return;
- glXMakeCurrent(MI_DISPLAY(mi),MI_WINDOW(mi),*(pp->glx_context));
+ glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *pp->glx_context);
init(mi);
}
#endif /* !STANDALONE */
+ENTRYPOINT void free_projectiveplane(ModeInfo *mi)
+{
+ projectiveplanestruct *pp = &projectiveplane[MI_SCREEN(mi)];
+ if (!pp->glx_context) return;
+ glXMakeCurrent (MI_DISPLAY(mi), MI_WINDOW(mi), *pp->glx_context);
+ gltrackball_free (pp->trackballs[0]);
+ gltrackball_free (pp->trackballs[1]);
+ if (pp->tex_name) glDeleteTextures (1, &pp->tex_name);
+}
+
XSCREENSAVER_MODULE ("ProjectivePlane", projectiveplane)
#endif /* USE_GL */