diff options
author | Simon Rettberg | 2019-02-18 11:55:58 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-02-18 11:55:58 +0100 |
commit | aa7530630e595b80d5db54655fd827b61edc0fd7 (patch) | |
tree | 048cb74072450c7592f254c3537ac8f252d09d73 /hacks/glx/blinkbox.c | |
parent | Forgot one DPMS killing instance (diff) | |
parent | Update to 5.42 (diff) | |
download | xscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.tar.gz xscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.tar.xz xscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.zip |
Merge branch 'master' into openslxv23
Diffstat (limited to 'hacks/glx/blinkbox.c')
-rw-r--r-- | hacks/glx/blinkbox.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/hacks/glx/blinkbox.c b/hacks/glx/blinkbox.c index f777371..45071a9 100644 --- a/hacks/glx/blinkbox.c +++ b/hacks/glx/blinkbox.c @@ -16,7 +16,6 @@ "*wireframe: False \n" \ "*suppressRotationAnimation: True\n" \ -# define free_ball 0 # define release_ball 0 # define ball_handle_event xlockmore_no_events #undef countof @@ -383,11 +382,11 @@ init_ball (ModeInfo *mi) #define SPHERE_SLICES 12 /* how densely to render spheres */ #define SPHERE_STACKS 16 - bp->sp = malloc(sizeof(*bp->sp)); +/* bp->sp = malloc(sizeof(*bp->sp)); if(bp->sp == NULL){ fprintf(stderr,"Could not allocate memory\n"); exit(1); - } + }*/ if( (bp->bscale.wh < 1) || (bp->bscale.wh > 8) ) { fprintf(stderr,"Boxsize out of range. Using default\n"); @@ -449,7 +448,7 @@ draw_ball (ModeInfo *mi) if (! bp->glx_context) return; mi->polygon_count = 0; - 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); @@ -603,6 +602,16 @@ draw_ball (ModeInfo *mi) } +ENTRYPOINT void +free_ball (ModeInfo *mi) +{ + blinkboxstruct *bp = &blinkbox[MI_SCREEN(mi)]; + if (!bp->glx_context) return; + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context); + if (glIsList(bp->ballList)) glDeleteLists(bp->ballList, 1); + if (glIsList(bp->boxList)) glDeleteLists(bp->boxList, 1); +} + XSCREENSAVER_MODULE_2 ("BlinkBox", blinkbox, ball) #endif /* USE_GL */ |