summaryrefslogtreecommitdiffstats
path: root/hacks/glx/atunnel.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/atunnel.c
parentUpdate gitignore (diff)
downloadxscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.gz
xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.xz
xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.zip
Update to 5.42
Diffstat (limited to 'hacks/glx/atunnel.c')
-rw-r--r--hacks/glx/atunnel.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hacks/glx/atunnel.c b/hacks/glx/atunnel.c
index f21d04f..1b8fb07 100644
--- a/hacks/glx/atunnel.c
+++ b/hacks/glx/atunnel.c
@@ -267,7 +267,7 @@ ENTRYPOINT void draw_atunnel(ModeInfo * mi)
if (!sa->glx_context)
return;
- glXMakeCurrent(display, window, *(sa->glx_context));
+ glXMakeCurrent(display, window, *sa->glx_context);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -303,13 +303,13 @@ ENTRYPOINT void init_atunnel(ModeInfo * mi)
}
-/* all sorts of nice cleanup code should go here! */
ENTRYPOINT void free_atunnel(ModeInfo * mi)
{
-#if 0
atunnelstruct *sa = &Atunnel[MI_SCREEN(mi)];
- FreeTunnel(sa->ts);
-#endif
+ if (!sa->glx_context) return;
+ glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *sa->glx_context);
+ atunnel_FreeTunnel(sa->ts);
+ glDeleteTextures (MAX_TEXTURE, sa->texture);
}
XSCREENSAVER_MODULE ("Atunnel", atunnel)