From ae69a754244c4e475c8d2591772ca8e005071d83 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 18 Feb 2019 11:55:41 +0100 Subject: Update to 5.42 --- hacks/glx/raverhoop.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'hacks/glx/raverhoop.c') diff --git a/hacks/glx/raverhoop.c b/hacks/glx/raverhoop.c index 5cf35f7..e08fdad 100644 --- a/hacks/glx/raverhoop.c +++ b/hacks/glx/raverhoop.c @@ -16,7 +16,6 @@ "*showFPS: False \n" \ "*wireframe: False \n" \ -# define free_hoop 0 # define release_hoop 0 #undef countof #define countof(x) (sizeof((x))/sizeof((*x))) @@ -715,7 +714,7 @@ draw_hoop (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); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -762,6 +761,31 @@ draw_hoop (ModeInfo *mi) glXSwapBuffers(dpy, window); } + +ENTRYPOINT void +free_hoop (ModeInfo *mi) +{ + hoop_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->lights) free (bp->lights); + while (bp->trail) { + afterimage *n = bp->trail->next; + free (bp->trail); + bp->trail = n; + } + while (bp->oscillators) { + oscillator *n = bp->oscillators->next; + free (bp->oscillators); + bp->oscillators = n; + } + +} + XSCREENSAVER_MODULE_2 ("RaverHoop", raverhoop, hoop) #endif /* USE_GL */ -- cgit v1.2.3-55-g7522