summaryrefslogtreecommitdiffstats
path: root/hacks/glx/noof.c
diff options
context:
space:
mode:
Diffstat (limited to 'hacks/glx/noof.c')
-rw-r--r--hacks/glx/noof.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/hacks/glx/noof.c b/hacks/glx/noof.c
index 4e42840..2349b07 100644
--- a/hacks/glx/noof.c
+++ b/hacks/glx/noof.c
@@ -19,7 +19,6 @@
"*doubleBuffer: False \n" \
"*suppressRotationAnimation: True\n" \
-# define free_noof 0
# define release_noof 0
# define noof_handle_event 0
#include "xlockmore.h"
@@ -379,7 +378,7 @@ draw_noof (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);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -398,6 +397,7 @@ draw_noof (ModeInfo *mi)
glBindTexture (GL_TEXTURE_2D, bp->screenshot_texture);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glColor3f (1, 1, 1);
glBegin (GL_QUADS);
glTexCoord2f (0, 0); glVertex3f (0, 0, 0);
glTexCoord2f (tw, 0); glVertex3f (bp->wd, 0, 0);
@@ -514,6 +514,16 @@ init_noof (ModeInfo *mi)
}
+ENTRYPOINT void
+free_noof (ModeInfo *mi)
+{
+ noof_configuration *bp = &bps[MI_SCREEN(mi)];
+ if (!bp->glx_context) return;
+ glXMakeCurrent (MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context);
+ if (bp->screenshot_texture) glDeleteTextures (1, &bp->screenshot_texture);
+}
+
+
XSCREENSAVER_MODULE ("Noof", noof)
#endif /* USE_GL */