summaryrefslogtreecommitdiffstats
path: root/hacks/glx/polytopes.c
diff options
context:
space:
mode:
authorSimon Rettberg2019-02-18 11:55:41 +0100
committerSimon Rettberg2019-02-18 11:55:41 +0100
commitae69a754244c4e475c8d2591772ca8e005071d83 (patch)
tree58b3fa7abc2dcfe3c23e1c0ce108950c720826ab /hacks/glx/polytopes.c
parentUpdate gitignore (diff)
downloadxscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.gz
xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.xz
xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.zip
Update to 5.42
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 */