diff options
author | Simon Rettberg | 2019-02-18 11:55:41 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-02-18 11:55:41 +0100 |
commit | ae69a754244c4e475c8d2591772ca8e005071d83 (patch) | |
tree | 58b3fa7abc2dcfe3c23e1c0ce108950c720826ab /hacks/glx/spheremonics.c | |
parent | Update gitignore (diff) | |
download | xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.gz xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.xz xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.zip |
Update to 5.42
Diffstat (limited to 'hacks/glx/spheremonics.c')
-rw-r--r-- | hacks/glx/spheremonics.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/hacks/glx/spheremonics.c b/hacks/glx/spheremonics.c index 9cefbf3..cf01c7d 100644 --- a/hacks/glx/spheremonics.c +++ b/hacks/glx/spheremonics.c @@ -66,7 +66,6 @@ "*suppressRotationAnimation: True\n" \ "*labelfont: -*-helvetica-medium-r-normal-*-*-180-*-*-*-*-*-*\n" -# define free_spheremonics 0 # define release_spheremonics 0 #undef countof #define countof(x) (sizeof((x))/sizeof((*x))) @@ -796,7 +795,7 @@ draw_spheremonics (ModeInfo *mi) if (!cc->glx_context) return; - glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(cc->glx_context)); + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *cc->glx_context); gl_init(mi); @@ -877,6 +876,21 @@ draw_spheremonics (ModeInfo *mi) glXSwapBuffers(dpy, window); } + +ENTRYPOINT void +free_spheremonics (ModeInfo *mi) +{ + spheremonics_configuration *cc = &ccs[MI_SCREEN(mi)]; + if (!cc->glx_context) return; + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *cc->glx_context); + if (cc->colors) free (cc->colors); + if (cc->trackball) gltrackball_free (cc->trackball); + if (cc->rot) free_rotator (cc->rot); + if (cc->font_data) free_texture_font (cc->font_data); + if (glIsList(cc->dlist)) glDeleteLists(cc->dlist, 1); + if (glIsList(cc->dlist2)) glDeleteLists(cc->dlist2, 1); +} + XSCREENSAVER_MODULE ("Spheremonics", spheremonics) #endif /* USE_GL */ |