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/glblur.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'hacks/glx/glblur.c') diff --git a/hacks/glx/glblur.c b/hacks/glx/glblur.c index cee020c..d1514d1 100644 --- a/hacks/glx/glblur.c +++ b/hacks/glx/glblur.c @@ -27,7 +27,6 @@ "*fpsSolid: True \n" \ "*suppressRotationAnimation: True\n" \ -# define free_glblur 0 # define release_glblur 0 #undef countof #define countof(x) (sizeof((x))/sizeof((*x))) @@ -483,7 +482,7 @@ draw_glblur (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); /* Decide what we're drawing */ @@ -605,6 +604,29 @@ draw_glblur (ModeInfo *mi) glXSwapBuffers(dpy, window); } + +ENTRYPOINT void +free_glblur (ModeInfo *mi) +{ + glblur_configuration *bp = &bps[MI_SCREEN(mi)]; + if (!bp->glx_context) return; + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context); + if (bp->tex_data) free (bp->tex_data); + if (bp->colors0) free (bp->colors0); + if (bp->colors1) free (bp->colors1); + if (bp->colors2) free (bp->colors2); + if (bp->colors3) free (bp->colors3); + if (bp->rot) free_rotator (bp->rot); + if (bp->trackball) gltrackball_free (bp->trackball); + if (glIsList(bp->obj_dlist0)) glDeleteLists(bp->obj_dlist0, 1); + if (glIsList(bp->obj_dlist1)) glDeleteLists(bp->obj_dlist1, 1); + if (glIsList(bp->obj_dlist2)) glDeleteLists(bp->obj_dlist2, 1); + if (glIsList(bp->obj_dlist3)) glDeleteLists(bp->obj_dlist3, 1); + if (glIsList(bp->scene_dlist1)) glDeleteLists(bp->scene_dlist1, 1); + if (glIsList(bp->scene_dlist2)) glDeleteLists(bp->scene_dlist2, 1); + if (bp->texture) glDeleteTextures (1, &bp->texture); +} + XSCREENSAVER_MODULE ("GLBlur", glblur) #endif /* USE_GL */ -- cgit v1.2.3-55-g7522