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/polyhedra-gl.c | |
parent | Forgot one DPMS killing instance (diff) | |
parent | Update to 5.42 (diff) | |
download | xscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.tar.gz xscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.tar.xz xscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.zip |
Merge branch 'master' into openslxv23
Diffstat (limited to 'hacks/glx/polyhedra-gl.c')
-rw-r--r-- | hacks/glx/polyhedra-gl.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/hacks/glx/polyhedra-gl.c b/hacks/glx/polyhedra-gl.c index 507d295..00f6bd4 100644 --- a/hacks/glx/polyhedra-gl.c +++ b/hacks/glx/polyhedra-gl.c @@ -24,7 +24,6 @@ "*suppressRotationAnimation: True\n" \ -# define free_polyhedra 0 # define release_polyhedra 0 #undef countof #define countof(x) (sizeof((x))/sizeof((*x))) @@ -581,7 +580,7 @@ draw_polyhedra (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); if (bp->mode == 0 && do_which >= 0 && bp->change_to < 0) ; @@ -678,6 +677,27 @@ draw_polyhedra (ModeInfo *mi) glXSwapBuffers(dpy, window); } + +ENTRYPOINT void +free_polyhedra (ModeInfo *mi) +{ + polyhedra_configuration *bp = &bps[MI_SCREEN(mi)]; + int i; + + if (!bp->glx_context) return; + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context); + + for (i = 0; i < bp->npolyhedra; i++) + free_polyhedron (bp->polyhedra[i]); + if (bp->trackball) gltrackball_free (bp->trackball); + if (bp->rot) free_rotator (bp->rot); + if (bp->colors) free (bp->colors); + if (bp->font1_data) free_texture_font (bp->font1_data); + if (bp->font2_data) free_texture_font (bp->font2_data); + if (bp->font3_data) free_texture_font (bp->font3_data); + if (glIsList(bp->object_list)) glDeleteLists(bp->object_list, 1); +} + XSCREENSAVER_MODULE ("Polyhedra", polyhedra) #endif /* USE_GL */ |