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/glmatrix.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'hacks/glx/glmatrix.c') 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 */ -- cgit v1.2.3-55-g7522