summaryrefslogtreecommitdiffstats
path: root/hacks/glx/flurry.c
diff options
context:
space:
mode:
authorSimon Rettberg2019-02-18 11:55:58 +0100
committerSimon Rettberg2019-02-18 11:55:58 +0100
commitaa7530630e595b80d5db54655fd827b61edc0fd7 (patch)
tree048cb74072450c7592f254c3537ac8f252d09d73 /hacks/glx/flurry.c
parentForgot one DPMS killing instance (diff)
parentUpdate to 5.42 (diff)
downloadxscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.tar.gz
xscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.tar.xz
xscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.zip
Merge branch 'master' into openslxv23
Diffstat (limited to 'hacks/glx/flurry.c')
-rw-r--r--hacks/glx/flurry.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/hacks/glx/flurry.c b/hacks/glx/flurry.c
index c9008a9..a236f52 100644
--- a/hacks/glx/flurry.c
+++ b/hacks/glx/flurry.c
@@ -90,6 +90,7 @@ ModStruct flurry_description = {
global_info_t *flurry_info = NULL;
+
static
double currentTime(void) {
struct timeval tv;
@@ -313,7 +314,7 @@ ENTRYPOINT void reshape_flurry(ModeInfo *mi, int width, int height)
{
global_info_t *global = flurry_info + MI_SCREEN(mi);
- glXMakeCurrent(MI_DISPLAY(mi), global->window, *(global->glx_context));
+ glXMakeCurrent(MI_DISPLAY(mi), global->window, *global->glx_context);
glViewport(0.0, 0.0, width, height);
glMatrixMode(GL_PROJECTION);
@@ -506,11 +507,11 @@ draw_flurry(ModeInfo * mi)
return;
if (global->first) {
- MakeTexture();
+ global->texid = MakeTexture();
global->first = 0;
}
glDrawBuffer(GL_BACK);
- glXMakeCurrent(display, window, *(global->glx_context));
+ glXMakeCurrent(display, window, *global->glx_context);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -535,13 +536,12 @@ free_flurry(ModeInfo * mi)
global_info_t *global = &flurry_info[MI_SCREEN(mi)];
flurry_info_t *flurry;
- if (global->glx_context) {
- glXMakeCurrent(MI_DISPLAY(mi), global->window, *(global->glx_context));
- }
+ if (!global->glx_context) return;
+ glXMakeCurrent(MI_DISPLAY(mi), global->window, *global->glx_context);
- for (flurry = global->flurry; flurry; flurry=flurry->next) {
- delete_flurry_info(flurry);
- }
+ for (flurry = global->flurry; flurry; flurry=flurry->next)
+ delete_flurry_info(flurry);
+ if (global->texid) glDeleteTextures (1, &global->texid);
}
XSCREENSAVER_MODULE ("Flurry", flurry)