summaryrefslogtreecommitdiffstats
path: root/hacks/glx/polytopes.c
diff options
context:
space:
mode:
Diffstat (limited to 'hacks/glx/polytopes.c')
-rw-r--r--hacks/glx/polytopes.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/hacks/glx/polytopes.c b/hacks/glx/polytopes.c
index 76c1287..c704722 100644
--- a/hacks/glx/polytopes.c
+++ b/hacks/glx/polytopes.c
@@ -93,7 +93,6 @@ static const char sccsid[] = "@(#)polytopes.c 1.2 05/09/28 xlockmore";
"*showFPS: False \n" \
"*suppressRotationAnimation: True\n" \
-# define free_polytopes 0
# define release_polytopes 0
# include "xlockmore.h" /* from the xscreensaver distribution */
#else /* !STANDALONE */
@@ -3097,7 +3096,7 @@ ENTRYPOINT void draw_polytopes(ModeInfo *mi)
if (!hp->glx_context)
return;
- glXMakeCurrent(display,window,*(hp->glx_context));
+ glXMakeCurrent(display, window, *hp->glx_context);
glMatrixMode(GL_PROJECTION);
@@ -3179,11 +3178,20 @@ ENTRYPOINT void change_polytopes(ModeInfo *mi)
if (!hp->glx_context)
return;
- glXMakeCurrent(MI_DISPLAY(mi),MI_WINDOW(mi),*(hp->glx_context));
+ glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *hp->glx_context);
init(mi);
}
#endif /* !STANDALONE */
+ENTRYPOINT void free_polytopes(ModeInfo *mi)
+{
+ polytopesstruct *hp = &poly[MI_SCREEN(mi)];
+ if (!hp->glx_context) return;
+ glXMakeCurrent (MI_DISPLAY(mi), MI_WINDOW(mi), *hp->glx_context);
+ gltrackball_free (hp->trackballs[0]);
+ gltrackball_free (hp->trackballs[1]);
+}
+
XSCREENSAVER_MODULE ("Polytopes", polytopes)
#endif /* USE_GL */