diff options
author | Simon Rettberg | 2019-02-18 11:55:58 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-02-18 11:55:58 +0100 |
commit | aa7530630e595b80d5db54655fd827b61edc0fd7 (patch) | |
tree | 048cb74072450c7592f254c3537ac8f252d09d73 /hacks/glx/gleidescope.c | |
parent | Forgot one DPMS killing instance (diff) | |
parent | Update to 5.42 (diff) | |
download | xscreensaver-23.tar.gz xscreensaver-23.tar.xz xscreensaver-23.zip |
Merge branch 'master' into openslxv23
Diffstat (limited to 'hacks/glx/gleidescope.c')
-rw-r--r-- | hacks/glx/gleidescope.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/hacks/glx/gleidescope.c b/hacks/glx/gleidescope.c index ec33388..60faf3e 100644 --- a/hacks/glx/gleidescope.c +++ b/hacks/glx/gleidescope.c @@ -1405,7 +1405,7 @@ ENTRYPOINT void reshape_gleidescope(ModeInfo *mi, int width, int height) h = height / (GLfloat) width; } - glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(gp->glx_context)); + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *gp->glx_context); glViewport(0, y, (GLint) width, (GLint) height); glMatrixMode(GL_PROJECTION); @@ -1574,7 +1574,7 @@ draw_gleidescope(ModeInfo * mi) glDrawBuffer(GL_BACK); - glXMakeCurrent(display, window, *(gp->glx_context)); + glXMakeCurrent(display, window, *gp->glx_context); draw(mi); if (mi->fps_p) { @@ -1608,15 +1608,12 @@ draw_gleidescope(ModeInfo * mi) ENTRYPOINT void free_gleidescope(ModeInfo * mi) { - gleidestruct *gp = &gleidescope[MI_SCREEN(mi)]; - - /* acd - is this needed? */ - if (gp->glx_context) { - /* Display lists MUST be freed while their glXContext is current. */ - glXMakeCurrent(MI_DISPLAY(mi), gp->window, *(gp->glx_context)); - - /* acd - was code here for freeing things that are no longer in struct */ - } + gleidestruct *gp = &gleidescope[MI_SCREEN(mi)]; + if (!gp->glx_context) return; + glXMakeCurrent (MI_DISPLAY(mi), MI_WINDOW(mi), *gp->glx_context); + if (glIsList(gp->list)) glDeleteLists(gp->list, 1); + if (gp->textures[0].id) glDeleteTextures (1, &gp->textures[0].id); + if (gp->textures[1].id) glDeleteTextures (1, &gp->textures[1].id); } XSCREENSAVER_MODULE ("Gleidescope", gleidescope) |