summaryrefslogtreecommitdiffstats
path: root/hacks/glx/moebius.c
diff options
context:
space:
mode:
authorSimon Rettberg2019-02-18 11:55:58 +0100
committerSimon Rettberg2019-02-18 11:55:58 +0100
commitaa7530630e595b80d5db54655fd827b61edc0fd7 (patch)
tree048cb74072450c7592f254c3537ac8f252d09d73 /hacks/glx/moebius.c
parentForgot one DPMS killing instance (diff)
parentUpdate to 5.42 (diff)
downloadxscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.tar.gz
xscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.tar.xz
xscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.zip
Merge branch 'master' into openslxv23
Diffstat (limited to 'hacks/glx/moebius.c')
-rw-r--r--hacks/glx/moebius.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/hacks/glx/moebius.c b/hacks/glx/moebius.c
index 5ef2c0d..e3155ac 100644
--- a/hacks/glx/moebius.c
+++ b/hacks/glx/moebius.c
@@ -79,7 +79,6 @@ static const char sccsid[] = "@(#)moebius.c 5.01 2001/03/01 xlockmore";
#ifdef STANDALONE
# define MODE_moebius
-# define free_moebius 0
# define release_moebius 0
# define DEFAULTS "*delay: 20000 \n" \
"*showFPS: False \n" \
@@ -715,7 +714,7 @@ draw_moebius (ModeInfo * mi)
if (!mp->glx_context)
return;
- glXMakeCurrent(display, window, *(mp->glx_context));
+ glXMakeCurrent(display, window, *mp->glx_context);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -777,11 +776,20 @@ change_moebius (ModeInfo * mi)
if (!mp->glx_context)
return;
- glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(mp->glx_context));
+ glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *mp->glx_context);
pinit();
}
#endif /* !STANDALONE */
+ENTRYPOINT void
+free_moebius (ModeInfo * mi)
+{
+ moebiusstruct *mp = &moebius[MI_SCREEN(mi)];
+ if (!mp->glx_context) return;
+ glXMakeCurrent (MI_DISPLAY(mi), MI_WINDOW(mi), *mp->glx_context);
+ if (mp->trackball) gltrackball_free (mp->trackball);
+ if (mp->rot) free_rotator (mp->rot);
+}
XSCREENSAVER_MODULE ("Moebius", moebius)