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/glmatrix.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/glmatrix.c')
-rw-r--r-- | hacks/glx/glmatrix.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/hacks/glx/glmatrix.c b/hacks/glx/glmatrix.c index 6a9b1fe..1e1c4f6 100644 --- a/hacks/glx/glmatrix.c +++ b/hacks/glx/glmatrix.c @@ -20,7 +20,6 @@ "*showFPS: False \n" \ "*wireframe: False \n" \ -# define free_matrix 0 # define release_matrix 0 #undef countof #define countof(x) (sizeof((x))/sizeof((*x))) @@ -986,7 +985,7 @@ draw_matrix (ModeInfo *mi) if (!mp->glx_context) return; - glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(mp->glx_context)); + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *mp->glx_context); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -1063,6 +1062,17 @@ draw_matrix (ModeInfo *mi) glXSwapBuffers(dpy, window); } + +ENTRYPOINT void +free_matrix (ModeInfo *mi) +{ + matrix_configuration *mp = &mps[MI_SCREEN(mi)]; + if (!mp->glx_context) return; + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *mp->glx_context); + if (mp->strips) free (mp->strips); + if (mp->texture) glDeleteTextures (1, &mp->texture); +} + XSCREENSAVER_MODULE_2 ("GLMatrix", glmatrix, matrix) #endif /* USE_GL */ |