From http://www.jwz.org/xscreensaver/xscreensaver-5.30.tar.gz
[xscreensaver] / hacks / glx / lockward.c
index d4081ee969e665860078ef300726ae99b7ecc411..16a432001674e6885e1ac22759818e5d09b8cd36 100644 (file)
@@ -197,9 +197,9 @@ reshape_lockward (ModeInfo *mi, int width, int height)
        glMatrixMode (GL_PROJECTION);
        glLoadIdentity ();
        if (height > width)
-               gluOrtho2D (-8.0, 8.0, -8.0 * h, 8.0 * h);
+               glOrtho (-8.0, 8.0, -8.0 * h, 8.0 * h, -1, 1);
        else
-               gluOrtho2D (-8.0 / h, 8.0 / h, -8.0, 8.0);
+               glOrtho (-8.0 / h, 8.0 / h, -8.0, 8.0, -1, 1);
 
        glMatrixMode (GL_MODELVIEW);
 }
@@ -214,7 +214,7 @@ lockward_handle_event (ModeInfo *mi, XEvent *event)
                char    c = 0;
 
                XLookupString (&event->xkey, &c, 1, &keysym, 0);
-               if (c == 'b') {
+               if (c == ' ' || c == '\t') {
                        ctx->blendmode ^= 1;
                        return True;
                }
@@ -290,7 +290,6 @@ gen_blade_arcs (lockward_context *ctx)
        there = M_PI * 2.0 / g_blades;
        step = there / SUBDIV;
        here -= SUBDIV * step / 2.0;
-       there -= SUBDIV * step / 2.0;
 
        /*
         * Build outer blade arcs.
@@ -806,9 +805,6 @@ init_lockward (ModeInfo *mi)
        glShadeModel (GL_FLAT);
        glFrontFace (GL_CW);
 
-
-       glClearColor (0.0, 0.0, 0.0, 1.0);
-
        ctx->blades_outer       = glGenLists (NRADII);
        ctx->blades_inner       = glGenLists (NRADII);
        ctx->rings              = glGenLists (NRADII - 1);