2 * lockward.c: First attempt at an Xscreensaver.
4 * Leo L. Schwab 2007.08.17
6 * Copyright (c) 2007 Leo L. Schwab
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the
10 * "Software"), to deal in the Software without restriction, including
11 * without limitation the rights to use, copy, modify, merge, publish,
12 * distribute, sublicense, and/or sell copies of the Software, and to permit
13 * persons to whom the Software is furnished to do so, subject to the
14 * following conditions:
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
22 * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
23 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
25 * USE OR OTHER DEALINGS IN THE SOFTWARE.
30 #include "xlockmore.h"
34 /***************************************************************************
37 #ifdef USE_GL /* whole file */
39 #define DEFAULTS "*delay: 20000 \n"\
42 #define refresh_lockward 0
45 #define NUMOF(x) (sizeof ((x)) / sizeof ((*x)))
50 #define COLORIDX_SHF 4
53 /***************************************************************************
54 * Structure definitions.
56 struct lockward_context; /* Forward declaration. */
61 #define uint8_t unsigned char
62 #define uint16_t unsigned short
63 #define uint32_t unsigned int
65 typedef struct bladestate {
66 uint8_t outer, inner; /* Radii */
69 typedef struct spinnerstate {
70 GLfloat rot; /* Terminal rotation after count expires */
71 GLfloat rotinc; /* Per-frame increment to rot. */
74 int ncolors; /* n.4 fixed-point */
75 int ccolor; /* n.4 fixed-point */
76 int colorinc; /* n.4 fixed-point */
81 typedef struct blinkstate {
82 int (*drawfunc) (struct lockward_context *ctx,
83 struct blinkstate *bs);
84 uint32_t *noise; /* For draw_blink_segment_scatter() */
87 int16_t dwell; /* <0: sharp >0: decay */
96 BTYPE_RADIAL_SINGLE = 0,
99 BTYPE_RADIAL_DOUBLESEQ,
100 BTYPE_SEGMENT_SINGLE,
101 BTYPE_SEGMENT_RANDOM,
102 BTYPE_CONCENTRIC_SINGLE,
103 BTYPE_CONCENTRIC_RANDOM,
104 BTYPE_CONCENTRIC_SEQ,
105 BTYPE_SEGMENT_SCATTER,
109 typedef struct lockward_context {
110 GLXContext *glx_context;
112 spinnerstate spinners[NSPINNERS];
115 GLuint blades_outer, blades_inner;
123 /***************************************************************************
126 static void free_lockward (lockward_context *ctx);
129 /***************************************************************************
132 static lockward_context *g_ctx = NULL;
133 static Bool g_blink_p = True;
134 static int g_blades = NBLADES;
135 static int g_rotateidle_min,
137 static int g_blinkidle_min,
139 static int g_blinkdwell_min,
142 #define DEF_BLINK "True"
143 #define DEF_ROTATEIDLEMIN "1000"
144 #define DEF_ROTATEIDLEMAX "6000"
145 #define DEF_BLINKIDLEMIN "1000"
146 #define DEF_BLINKIDLEMAX "9000"
147 #define DEF_BLINKDWELLMIN "100"
148 #define DEF_BLINKDWELLMAX "600"
151 static XrmOptionDescRec opts[] = {
152 { "-blink", ".blink", XrmoptionNoArg, "on" },
153 { "+blink", ".blink", XrmoptionNoArg, "off" },
154 { "-rotateidle-min", ".rotateidlemin", XrmoptionSepArg, 0 },
155 { "-rotateidle-max", ".rotateidlemax", XrmoptionSepArg, 0 },
156 { "-blinkidle-min", ".blinkidlemin", XrmoptionSepArg, 0 },
157 { "-blinkidle-max", ".blinkidlemax", XrmoptionSepArg, 0 },
158 { "-blinkdwell-min", ".blinkdwellmin", XrmoptionSepArg, 0 },
159 { "-blinkdwell-max", ".blinkdwellmax", XrmoptionSepArg, 0 },
162 static argtype vars[] = {
163 { &g_blink_p, "blink", "Blink", DEF_BLINK, t_Bool },
164 { &g_rotateidle_min, "rotateidlemin", "Rotateidlemin", DEF_ROTATEIDLEMIN, t_Int },
165 { &g_rotateidle_max, "rotateidlemax", "Rotateidlemax", DEF_ROTATEIDLEMAX, t_Int },
166 { &g_blinkidle_min, "blinkidlemin", "Blinkidlemin", DEF_BLINKIDLEMIN, t_Int },
167 { &g_blinkidle_max, "blinkidlemax", "Blinkidlemax", DEF_BLINKIDLEMAX, t_Int },
168 { &g_blinkdwell_min, "blinkdwellmin", "Blinkdwellmin", DEF_BLINKDWELLMIN, t_Int },
169 { &g_blinkdwell_max, "blinkdwellmax", "Blinkdwellmax", DEF_BLINKDWELLMAX, t_Int },
172 static OptionStruct desc[] = {
173 { "-/+blink", "Turn on/off blinking effects." },
174 { "-rotateidle-min", "Minimum idle time for rotators, in milliseconds." },
175 { "-rotateidle-max", "Maximum idle time for rotators, in milliseconds." },
176 { "-blinkidle-min", "Minimum idle time between blink effects, in milliseconds." },
177 { "-blinkidle-max", "Maximum idle time between blink effects, in milliseconds." },
178 { "-blinkdwell-min", "Minimum dwell time for blink effects, in milliseconds." },
179 { "-blinkdwell-max", "Maximum dwell time for blink effects, in milliseconds." },
182 ENTRYPOINT ModeSpecOpt lockward_opts = {
183 NUMOF(opts), opts, NUMOF(vars), vars, desc
187 /***************************************************************************
191 reshape_lockward (ModeInfo *mi, int width, int height)
193 GLfloat h = (GLfloat) height / (GLfloat) width;
195 glViewport (0, 0, (GLint) width, (GLint) height);
197 glMatrixMode (GL_PROJECTION);
200 gluOrtho2D (-8.0, 8.0, -8.0 * h, 8.0 * h);
202 gluOrtho2D (-8.0 / h, 8.0 / h, -8.0, 8.0);
204 glMatrixMode (GL_MODELVIEW);
208 lockward_handle_event (ModeInfo *mi, XEvent *event)
210 lockward_context *ctx = &g_ctx[MI_SCREEN (mi)];
212 if (event->xany.type == KeyPress) {
216 XLookupString (&event->xkey, &c, 1, &keysym, 0);
227 /***************************************************************************
231 random_blade_rot (lockward_context *ctx, struct spinnerstate *ss)
234 * The circle is divided up in to g_blades divisions. The idea here
235 * is to rotate to an exact division point.
237 * The target rotation is computed via random numbers.
239 * The time it takes to get there is a maximum of six seconds per
240 * division, and a minimum of one second (no matter how far away it
241 * is), and is selected by random numbers.
243 * The time value is converted into frames, and a per-frame rotation
246 * During rendering, we approach the target rotation by subtracting
247 * from it the per-frame rotation times the number of outstanding
248 * ticks. Doing it this way means we'll hit the target rotation
249 * exactly, without low-order errors creeping in to the values (at
250 * least not nearly as quickly).
255 dist = random() % g_blades + 1;
257 ss->rotcount = random() % (6 * dist * ctx->fps - ctx->fps)
262 d = dist * 360.0 / (GLfloat) g_blades;
264 ss->rotinc = d / (GLfloat) ss->rotcount;
269 * A "blade" is pie-wedge shaped flat thing that is rotated around where the
270 * apex is/would be. Initially envisioned as 1/12th of a circle, but that
271 * could be configurable. The inner and outer edges are rounded off using
272 * six subdivisions so that, when multiple blades are assembled, it looks
273 * more like a circle and less like a polygon.
275 * The blade is assembled as a tri-fan. It is oriented centered at 3
276 * o'clock. The blade is composed of two display lists -- arcs, essentially
277 * -- the outer and the inner one. The outer one *must* be called before
278 * the inner one, or the blade clockwise-ness will be wrong, and become
279 * invisible. Arcs of various radii are compiled.
284 gen_blade_arcs (lockward_context *ctx)
286 GLfloat here, there, step;
290 there = M_PI * 2.0 / g_blades;
291 step = there / SUBDIV;
292 here -= SUBDIV * step / 2.0;
293 there -= SUBDIV * step / 2.0;
296 * Build outer blade arcs.
297 * Start at left side of outer radius. Strike all its vertices.
299 for (n = 0; n < NRADII; ++n) {
300 glNewList (ctx->blades_outer + n, GL_COMPILE);
301 for (i = SUBDIV; i >= 0; --i)
302 glVertex3f (cos (here + step * i) * (n + 1.0),
303 sin (here + step * i) * (n + 1.0), 0);
308 * Build inner blade arcs.
309 * Move to inner radius, strike all vertices in opposite order.
311 for (n = 0; n < NRADII; ++n) {
312 glNewList (ctx->blades_inner + n, GL_COMPILE);
313 for (i = 0; i <= SUBDIV; ++i)
314 glVertex3f (cos (here + step * i) * (n + 1.0),
315 sin (here + step * i) * (n + 1.0), 0);
321 gen_rings (lockward_context *ctx)
326 step = M_PI * 2.0 / (g_blades * SUBDIV);
328 for (n = 0; n < NRADII - 1; ++n) {
329 glNewList (ctx->rings + n, GL_COMPILE);
330 glBegin (GL_TRIANGLE_STRIP);
331 for (i = g_blades * SUBDIV; i >= 0; --i) {
332 glVertex3f (cos (step * i) * (n + 1.0),
333 sin (step * i) * (n + 1.0), 0);
334 glVertex3f (cos (step * i) * (n + 2.0),
335 sin (step * i) * (n + 2.0), 0);
343 /***************************************************************************
347 calc_interval_frames (lockward_context *ctx, int min, int max)
350 * Compute random interval between min and max milliseconds.
351 * Returned value is in frames.
357 i += random() % (max - min);
359 return i * ctx->fps / 1000;
363 set_alpha_by_dwell (struct blinkstate *bs)
366 bs->color[3] = (GLfloat) bs->dwellcnt / (GLfloat) bs->dwell;
368 bs->color[3] = bs->dwellcnt > (-bs->dwell >> 2) ? 1.0 : 0.0;
372 draw_blink_blade (lockward_context *ctx, int inner, int outer)
374 glBegin (GL_TRIANGLE_FAN);
375 glCallList (ctx->blades_outer + outer);
376 glCallList (ctx->blades_inner + inner);
381 draw_blink_radial_random (lockward_context *ctx, struct blinkstate *bs)
386 * There is no sense of direction in a random sweep, so re-use the
387 * 'direction' field to hold the current blade we're messing with.
389 if (bs->dwellcnt < 0) {
390 if (bs->counter <= 0) {
396 * Find available blade. Potentially very slow, depending on
397 * how unlucky we are.
400 i = random() % g_blades;
401 } while (bs->val & (1 << i));
402 bs->val |= (1 << i); /* Mark as used. */
404 if ((bs->dwellcnt = bs->dwell) < 0)
405 bs->dwellcnt = -bs->dwellcnt;
407 if ( bs->type == BTYPE_SEGMENT_SINGLE
408 || bs->type == BTYPE_SEGMENT_RANDOM)
409 bs->radius = random() % (NRADII - 1);
414 set_alpha_by_dwell (bs);
415 glBlendFunc (GL_DST_COLOR, GL_SRC_ALPHA);
416 glColor4fv (bs->color);
417 glRotatef (bs->direction * 360.0 / (GLfloat) g_blades, 0, 0, 1);
419 draw_blink_blade (ctx, bs->radius, bs->radius + 1);
421 draw_blink_blade (ctx, 0, NRADII - 1);
425 return SUBDIV + SUBDIV;
429 draw_blink_radial_sequential (lockward_context *ctx, struct blinkstate *bs)
431 if (bs->dwellcnt < 0) {
432 if (bs->counter <= 0) {
436 if ((bs->dwellcnt = bs->dwell) < 0)
437 bs->dwellcnt = -bs->dwellcnt;
441 set_alpha_by_dwell (bs);
442 glBlendFunc (GL_DST_COLOR, GL_SRC_ALPHA);
443 glColor4fv (bs->color);
444 glRotatef ((bs->counter * bs->direction + (int) bs->val)
445 * 360.0 / (GLfloat) g_blades,
447 draw_blink_blade (ctx, 0, NRADII - 1);
451 return SUBDIV + SUBDIV;
455 draw_blink_radial_doubleseq (lockward_context *ctx, struct blinkstate *bs)
459 if (bs->dwellcnt < 0) {
460 if (bs->counter <= 0) {
464 if ((bs->dwellcnt = bs->dwell) < 0)
465 bs->dwellcnt = -bs->dwellcnt;
469 set_alpha_by_dwell (bs);
470 glBlendFunc (GL_DST_COLOR, GL_SRC_ALPHA);
471 glColor4fv (bs->color);
474 glRotatef (((int) bs->val + bs->counter) * 360.0 / (GLfloat) g_blades,
476 draw_blink_blade (ctx, 0, NRADII - 1);
478 polys = SUBDIV + SUBDIV;
480 if (bs->counter && bs->counter < g_blades / 2) {
481 glRotatef (((int) bs->val - bs->counter)
482 * 360.0 / (GLfloat) g_blades,
484 draw_blink_blade (ctx, 0, NRADII - 1);
485 polys += SUBDIV + SUBDIV;
494 draw_blink_concentric_random (lockward_context *ctx, struct blinkstate *bs)
498 if (bs->dwellcnt < 0) {
499 if (bs->counter <= 0) {
505 i = random() % (NRADII - 1);
506 } while (bs->val & (1 << i));
509 if ((bs->dwellcnt = bs->dwell) < 0)
510 bs->dwellcnt = -bs->dwellcnt;
515 set_alpha_by_dwell (bs);
516 glBlendFunc (GL_DST_COLOR, GL_SRC_ALPHA);
517 glColor4fv (bs->color);
518 glCallList (ctx->rings + bs->direction);
522 return g_blades * SUBDIV * 2;
526 draw_blink_concentric_sequential (lockward_context *ctx, struct blinkstate *bs)
528 if (bs->dwellcnt < 0) {
529 if (bs->counter <= 0) {
533 if ((bs->dwellcnt = bs->dwell) < 0)
534 bs->dwellcnt = -bs->dwellcnt;
538 set_alpha_by_dwell (bs);
539 glBlendFunc (GL_DST_COLOR, GL_SRC_ALPHA);
540 glColor4fv (bs->color);
541 if (bs->direction > 0)
542 glCallList (ctx->rings + (NRADII - 2) - bs->counter);
544 glCallList (ctx->rings + bs->counter);
548 return g_blades * SUBDIV * 2;
552 draw_blink_segment_scatter (lockward_context *ctx, struct blinkstate *bs)
556 if (bs->dwellcnt < 0) {
557 if (bs->counter <= 0) {
563 * Init random noise array. On average, 1/4 of the bits will
564 * be set, which should look nice. (1/2 looks too busy.)
566 for (i = g_blades; --i >= 0; )
567 bs->noise[i] = random() & random()
568 & ((1 << (NRADII - 1)) - 1);
570 if ((bs->dwellcnt = bs->dwell) < 0)
571 bs->dwellcnt = -bs->dwellcnt;
575 set_alpha_by_dwell (bs);
576 glBlendFunc (GL_DST_COLOR, GL_SRC_ALPHA);
577 glColor4fv (bs->color);
579 for (i = g_blades; --i >= 0; ) {
580 register uint32_t bits;
584 * Find consecutive runs of 1 bits. Keep going until we run
587 for (bits = bs->noise[i]; bits; ) {
588 inner = ffs (bits) - 1;
589 bits = ~bits & ~((1 << inner) - 1);
590 outer = ffs (bits) - 1;
591 bits = ~bits & ~((1 << outer) - 1);
594 glRotatef (i * 360.0 / (GLfloat) g_blades, 0, 0, 1);
595 draw_blink_blade (ctx, inner, outer);
598 polys += SUBDIV + SUBDIV;
608 random_blink (lockward_context *ctx, struct blinkstate *bs)
616 bs->dwell = calc_interval_frames
617 (ctx, g_blinkdwell_min, g_blinkdwell_max);
619 bs->dwell = -bs->dwell;
621 bs->type = random() % MAX_BTYPE;
624 case BTYPE_RADIAL_SINGLE:
625 case BTYPE_SEGMENT_SINGLE:
626 bs->drawfunc = draw_blink_radial_random;
630 case BTYPE_RADIAL_RANDOM:
631 case BTYPE_SEGMENT_RANDOM:
632 bs->drawfunc = draw_blink_radial_random;
634 bs->counter = g_blades;
636 case BTYPE_RADIAL_SEQ:
637 bs->drawfunc = draw_blink_radial_sequential;
638 bs->val = random() % g_blades; /* Initial offset */
639 bs->direction = random() & 8 ? 1 : -1;
640 bs->counter = g_blades;
642 case BTYPE_RADIAL_DOUBLESEQ:
643 bs->drawfunc = draw_blink_radial_doubleseq;
644 bs->val = random() % g_blades; /* Initial offset */
645 bs->counter = g_blades / 2 + 1;
647 case BTYPE_CONCENTRIC_SINGLE:
648 bs->drawfunc = draw_blink_concentric_random;
652 case BTYPE_CONCENTRIC_RANDOM:
653 bs->drawfunc = draw_blink_concentric_random;
655 bs->counter = NRADII - 1;
657 case BTYPE_CONCENTRIC_SEQ:
658 bs->drawfunc = draw_blink_concentric_sequential;
659 bs->direction = random() & 8 ? 1 : -1;
660 bs->counter = NRADII - 1;
662 case BTYPE_SEGMENT_SCATTER:
663 bs->drawfunc = draw_blink_segment_scatter;
664 bs->counter = random() % (g_blades / 2) + (g_blades / 2) + 1;
670 /***************************************************************************
671 * Main rendering routine.
674 draw_lockward (ModeInfo *mi)
676 lockward_context *ctx = &g_ctx[MI_SCREEN (mi)];
678 Display *dpy = MI_DISPLAY(mi);
679 Window window = MI_WINDOW(mi);
682 GLfloat scolor[4] = {0.0, 0.0, 0.0, 0.5};
684 if (!ctx->glx_context)
687 glXMakeCurrent (MI_DISPLAY (mi), MI_WINDOW (mi), *(ctx->glx_context));
690 glClear (GL_COLOR_BUFFER_BIT);
693 glBlendFunc (GL_ONE, GL_ONE);
695 glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
700 mi->polygon_count = 0;
702 for (n = NSPINNERS; --n >= 0; ) {
703 ss = &ctx->spinners[n];
706 i = ss->ccolor >> COLORIDX_SHF;
707 scolor[0] = ss->colors[i].red / 65535.0;
708 scolor[1] = ss->colors[i].green / 65535.0;
709 scolor[2] = ss->colors[i].blue / 65535.0;
713 glRotatef (ss->rot - ss->rotcount * ss->rotinc, 0, 0, 1);
714 for (i = ss->nblades; --i >= 0; ) {
716 glRotatef (360.0 * i / ss->nblades, 0, 0, 1);
718 glBegin (GL_TRIANGLE_FAN);
719 glCallList (ctx->blades_outer + ss->bladeidx[i].outer);
720 glCallList (ctx->blades_inner + ss->bladeidx[i].inner);
724 mi->polygon_count += SUBDIV + SUBDIV;
728 /* Advance rotation. */
730 if (ss->rotcount > 0)
733 if (ss->rotinc == 0.0)
734 random_blade_rot (ctx, ss);
736 /* Compute # of ticks to sit idle. */
739 calc_interval_frames (ctx,
745 /* Advance colors. */
746 if ((ss->ccolor += ss->colorinc) >= ss->ncolors)
747 ss->ccolor -= ss->ncolors;
748 else if (ss->ccolor < 0)
749 ss->ccolor += ss->ncolors;
753 if (ctx->blink.drawfunc) {
755 ctx->blink.drawfunc (ctx, &ctx->blink);
757 if (ctx->nextblink > 0)
760 /* Compute # of frames for blink idle time. */
762 calc_interval_frames (ctx,
765 random_blink (ctx, &ctx->blink);
771 if (MI_IS_FPS (mi)) do_fps (mi);
774 glXSwapBuffers (dpy, window);
778 /***************************************************************************
779 * Initialization/teardown.
782 init_lockward (ModeInfo *mi)
784 lockward_context *ctx;
788 g_ctx = (lockward_context *) calloc (MI_NUM_SCREENS (mi),
789 sizeof (lockward_context));
791 fprintf (stderr, "%s: can't allocate context.\n",
796 ctx = &g_ctx[MI_SCREEN (mi)];
798 ctx->glx_context = init_GL (mi);
800 reshape_lockward (mi, MI_WIDTH (mi), MI_HEIGHT (mi));
802 glEnable (GL_CULL_FACE);
804 glDisable (GL_DEPTH_TEST);
806 glShadeModel (GL_FLAT);
810 glClearColor (0.0, 0.0, 0.0, 1.0);
812 ctx->blades_outer = glGenLists (NRADII);
813 ctx->blades_inner = glGenLists (NRADII);
814 ctx->rings = glGenLists (NRADII - 1);
816 ctx->fps = 1000000 / MI_DELAY (mi);
817 ctx->nextblink = calc_interval_frames
818 (ctx, g_blinkidle_min, g_blinkidle_max);
819 ctx->blink.drawfunc = NULL;
820 ctx->blink.noise = malloc (sizeof (uint32_t) * g_blades);
821 if (!ctx->blink.noise) {
822 fprintf (stderr, "Can't allocate noise array.\n");
826 gen_blade_arcs (ctx);
829 for (i = NSPINNERS; --i >= 0; ) {
830 spinnerstate *ss = &ctx->spinners[i];
835 /* Establish rotation */
836 random_blade_rot (ctx, ss);
839 * Establish color cycling path and rate. Rate avoids zero.
842 ss->colorinc = (random() & ((2 << COLORIDX_SHF) - 1))
843 - (1 << COLORIDX_SHF);
844 if (ss->colorinc >= 0)
847 ss->colors = (XColor *) calloc (ss->ncolors, sizeof (XColor));
850 "Can't allocate XColors for spinner %d.\n",
854 make_smooth_colormap (0, 0, 0,
855 ss->colors, &ss->ncolors,
857 ss->ncolors <<= COLORIDX_SHF;
862 ss->nblades = g_blades;
863 ss->bladeidx = malloc (sizeof (bladestate) * g_blades);
865 fprintf (stderr, "Can't allocate blades.\n");
868 for (n = g_blades; --n >= 0; ) {
870 * Establish blade radii. Can't be equal. Ensure
874 ss->bladeidx[n].outer = random() & 7;
875 ss->bladeidx[n].inner = random() & 7;
876 } while (ss->bladeidx[n].outer ==
877 ss->bladeidx[n].inner);
879 if (ss->bladeidx[n].outer < ss->bladeidx[n].inner) {
882 tmp = ss->bladeidx[n].outer;
883 ss->bladeidx[n].outer = ss->bladeidx[n].inner;
884 ss->bladeidx[n].inner = tmp;
891 free_lockward (lockward_context *ctx)
895 if (ctx->blink.noise)
896 free (ctx->blink.noise);
897 if (glIsList (ctx->rings))
898 glDeleteLists (ctx->rings, NRADII - 1);
899 if (glIsList (ctx->blades_outer))
900 glDeleteLists (ctx->blades_outer, NRADII);
901 if (glIsList (ctx->blades_inner))
902 glDeleteLists (ctx->blades_inner, NRADII);
904 for (i = NSPINNERS; --i >= 0; ) {
905 spinnerstate *ss = &ctx->spinners[i];
915 release_lockward (ModeInfo *mi)
922 for (i = MI_NUM_SCREENS (mi); --i >= 0; ) {
923 if (g_ctx[i].glx_context)
924 glXMakeCurrent (MI_DISPLAY (mi), MI_WINDOW (mi),
925 *(g_ctx[i].glx_context));
926 free_lockward (&g_ctx[i]);
930 free (g_ctx); g_ctx = NULL;
934 XSCREENSAVER_MODULE ("Lockward", lockward)
938 /* vim:se ts=8 sts=8 sw=8: */