summaryrefslogtreecommitdiffstats
path: root/hacks/glx/blocktube.c
diff options
context:
space:
mode:
authorSimon Rettberg2019-02-18 11:55:41 +0100
committerSimon Rettberg2019-02-18 11:55:41 +0100
commitae69a754244c4e475c8d2591772ca8e005071d83 (patch)
tree58b3fa7abc2dcfe3c23e1c0ce108950c720826ab /hacks/glx/blocktube.c
parentUpdate gitignore (diff)
downloadxscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.gz
xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.xz
xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.zip
Update to 5.42
Diffstat (limited to 'hacks/glx/blocktube.c')
-rw-r--r--hacks/glx/blocktube.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/hacks/glx/blocktube.c b/hacks/glx/blocktube.c
index d4a402e..811b185 100644
--- a/hacks/glx/blocktube.c
+++ b/hacks/glx/blocktube.c
@@ -291,14 +291,13 @@ ENTRYPOINT void free_blocktube (ModeInfo *mi)
{
blocktube_configuration *lp = &lps[MI_SCREEN(mi)];
# if defined ( I_HAVE_XPM )
- if (lp->glx_context) {
- glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(lp->glx_context));
-
- if (lp->envTexture)
- glDeleteTextures(1, &lp->envTexture);
- if (lp->texti)
- XDestroyImage(lp->texti);
- }
+ if (!lp->glx_context) return;
+ glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *lp->glx_context);
+ if (lp->envTexture) glDeleteTextures(1, &lp->envTexture);
+ if (lp->texti) XDestroyImage(lp->texti);
+ if (glIsList(lp->block_dlist)) glDeleteLists(lp->block_dlist, 1);
+ if (lp->envTexture) glDeleteTextures (1, &lp->envTexture);
+
# endif
}
@@ -308,7 +307,7 @@ ENTRYPOINT void reshape_blocktube (ModeInfo *mi, int width, int height)
GLfloat h = (GLfloat) height / (GLfloat) width;
int y = 0;
- glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(lp->glx_context));
+ glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *lp->glx_context);
if (width > height * 5) { /* tiny window: show middle */
height = width;
@@ -421,7 +420,7 @@ draw_blocktube (ModeInfo *mi)
mi->polygon_count = 0;
- glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(lp->glx_context));
+ glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *lp->glx_context);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);