summaryrefslogtreecommitdiffstats
path: root/hacks/glx/geodesic.c
diff options
context:
space:
mode:
Diffstat (limited to 'hacks/glx/geodesic.c')
-rw-r--r--hacks/glx/geodesic.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/hacks/glx/geodesic.c b/hacks/glx/geodesic.c
index 9ef2696..83fd4ac 100644
--- a/hacks/glx/geodesic.c
+++ b/hacks/glx/geodesic.c
@@ -14,7 +14,6 @@
"*showFPS: False \n" \
"*suppressRotationAnimation: True\n" \
-# define free_geodesic 0
# define release_geodesic 0
#undef countof
#define countof(x) (sizeof((x))/sizeof((*x)))
@@ -625,7 +624,7 @@ draw_geodesic (ModeInfo *mi)
if (!bp->glx_context)
return;
- glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(bp->glx_context));
+ glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context);
if (! wire)
glShadeModel(GL_SMOOTH);
@@ -811,6 +810,18 @@ draw_geodesic (ModeInfo *mi)
}
}
+
+ENTRYPOINT void
+free_geodesic (ModeInfo *mi)
+{
+ geodesic_configuration *bp = &bps[MI_SCREEN(mi)];
+ if (!bp->glx_context) return;
+ glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context);
+ if (bp->trackball) gltrackball_free (bp->trackball);
+ if (bp->rot) free_rotator (bp->rot);
+ if (bp->colors) free (bp->colors);
+}
+
XSCREENSAVER_MODULE ("Geodesic", geodesic)
#endif /* USE_GL */