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/projectiveplane.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'hacks/glx/projectiveplane.c') diff --git a/hacks/glx/projectiveplane.c b/hacks/glx/projectiveplane.c index 2a1e566..3a052ea 100644 --- a/hacks/glx/projectiveplane.c +++ b/hacks/glx/projectiveplane.c @@ -219,7 +219,6 @@ static const char sccsid[] = "@(#)projectiveplane.c 1.1 14/01/01 xlockmore"; # define DEFAULTS "*delay: 10000 \n" \ "*showFPS: False \n" \ -# define free_projectiveplane 0 # define release_projectiveplane 0 # include "xlockmore.h" /* from the xscreensaver distribution */ #else /* !STANDALONE */ @@ -1516,7 +1515,7 @@ ENTRYPOINT void draw_projectiveplane(ModeInfo *mi) if (!pp->glx_context) return; - glXMakeCurrent(display,window,*(pp->glx_context)); + glXMakeCurrent(display, window, *pp->glx_context); glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glLoadIdentity(); @@ -1540,11 +1539,21 @@ ENTRYPOINT void change_projectiveplane(ModeInfo *mi) if (!pp->glx_context) return; - glXMakeCurrent(MI_DISPLAY(mi),MI_WINDOW(mi),*(pp->glx_context)); + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *pp->glx_context); init(mi); } #endif /* !STANDALONE */ +ENTRYPOINT void free_projectiveplane(ModeInfo *mi) +{ + projectiveplanestruct *pp = &projectiveplane[MI_SCREEN(mi)]; + if (!pp->glx_context) return; + glXMakeCurrent (MI_DISPLAY(mi), MI_WINDOW(mi), *pp->glx_context); + gltrackball_free (pp->trackballs[0]); + gltrackball_free (pp->trackballs[1]); + if (pp->tex_name) glDeleteTextures (1, &pp->tex_name); +} + XSCREENSAVER_MODULE ("ProjectivePlane", projectiveplane) #endif /* USE_GL */ -- cgit v1.2.3-55-g7522